popupInfo

Defines the look and feel of popup windows when a user clicks or queries a feature.

Referenced by: Annotation Layer (ArcGISAnnotationLayer), CSV Layer (CSV), Dimension Layer (ArcGISDimensionLayer), Feature Layer (ArcGISFeatureLayer), Feature Reduction Binning, Feature Reduction Cluster, feature, Footprint Layer (FootprintLayer), GeoJSON Layer (GeoJSON), Image Service Layer (ArcGISImageServiceLayer), Image Service Vector Layer (ArcGISImageServiceVectorLayer), Knowledge Graph Sub Table (KnowledgeGraphSubTable), KnowledgeGraph Sub Layer (KnowledgeGraphSubLayer), layer, Link Chart Aggregation Layer (LinkChartAggregationLayer), Link Chart Sub Layer (LinkChartSubLayer), OGC Feature Layer, Oriented Imagery Layer (OrientedImageryLayer), Stream Layer (ArcGISStreamLayer), Subtype Layer (SubtypeLayer), Subtype Table (SubtypeTable), table, Tiled Image Service Layer (ArcGISTiledImageServiceLayer), Web Feature Service Layer (WFS)

Properties

Property Details
description A string that appears in the body of the popup window as a description. A basic subset of HTML may also be used to enrich the text. The supported HTML for ArcGIS Online can be seen in the Supported HTML page.
expressionInfos[] List of Arcade expressions added to the pop-up.
fieldInfos[] Array of fieldInfo information properties. This information is provided by the service layer definition. When the description uses name/value pairs, the order of the array is how the fields display in the editable Map Viewer popup and the resulting popup. It is also possible to specify HTML-formatted content.
layerOptions Additional options that can be defined for the popup layer.
mediaInfos[] Array of various mediaInfo to display. Can be of type image, piechart, barchart, columnchart, or linechart. The order given is the order in which is displays.
popupElements[] An array of popupElement objects that represent an ordered list of popup elements.
relatedRecordsInfo Applicable only when the pop-up contains a relationship content element. This is needed for backward compatibility for some web maps.
showAttachments Indicates whether attachments will be loaded for feature layers that have attachments.
showLastEditInfo Indicates whether popup will display information about when and who last edited the feature. Applicable only to layers that have been configured to keep track of such information.
title A string that appears at the top of the popup window as a title.

Example

{
  "title": "Postcode status",
  "fieldInfos": [
    {
      "fieldName": "expression/expr1",
      "visible": true,
      "format": {
        "digitSeparator": true,
        "places": 0
      }
    },
    {
      "fieldName": "expression/expr2",
      "visible": true
    },
    {
      "fieldName": "ID",
      "label": "ID",
      "tooltip": "Identifier",
      "visible": true,
      "format": {
        "places": 0,
        "digitSeparator": true
      },
      "stringFieldOption": "textbox"
    },
    {
      "fieldName": "relationships/0/Status",
      "label": "Status",
      "isEditable": false,
      "visible": true,
      "stringFieldOption": "textbox"
    },
    {
      "fieldName": "relationships/2/Postcode",
      "label": "Postcode",
      "isEditable": false,
      "visible": false,
      "stringFieldOption": "textbox"
    }
  ],
  "showAttachments": true,
  "relatedRecordsInfo": {
    "showRelatedRecords": true,
    "orderByFields": [
      {
        "field": "relationships/0/Identifier",
        "order": "asc"
      },
      {
        "field": "relationships/1/Status",
        "order": "desc"
      }
    ]
  },
  "mediaInfos": [
    {
      "title": "Chart stats",
      "type": "barchart",
      "caption": "For a better idea...",
      "value": {
        "fields": [
          "relationships/0/Pledge"
        ],
        "tooltipField": "relationships/2/Official"
      }
    },
    {
      "type": "barchart",
      "title": "{pop2000} / 2 = {expression/expr4}",
      "value": {
        "fields": [
          "expression/expr4",
          "pop2000"
        ]
      }
    }
  ],
  "popupElements": [],
  "expressionInfos": [
    {
      "name": "expr1",
      "title": "Population (Expr)",
      "expression": "$feature.pop2000",
      "returnType": "number"
    },
    {
      "name": "expr2",
      "title": "Name (Abbr) (Expr)",
      "expression": "$feature.state_name + ' (' + $feature.state_abbr + ')'",
      "returnType": "string"
    }
  ]
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.