popupInfo

Defines the look and feel of pop-up windows when users click or query a feature.

Properties

Property

Details

description

A string that appears in the body of the pop-up window as a description. This can contain a field name enclosed in {}, such as {DETAILS}.

fieldInfos

An array of fieldInfo objects defining how each field in the dataset participates (or does not participate) in the pop-up window. The order of the array is the order that fields are shown in the pop-up window.

mediaInfos

An array of mediaInfo objects that define images and charts displayed in the pop-up window.

showAttachments

A Boolean property determining whether attachments will be loaded for feature layers that have attachments.

title

A string that appears at the top of the pop-up window as a title. This can contain a field name enclosed in {}, such as {NAME}.

Example

"popupInfo": {
          "title": "{NAME}",
          "fieldInfos": [
            {
              "fieldName": "__OBJECTID",
              "label": "__OBJECTID",
              "isEditable": true,
              "tooltip": "",
              "visible": false,
              "stringFieldOption": "textbox"
            },
            {
              "fieldName": "Name",
              "label": "Name",
              "isEditable": true,
              "tooltip": "",
              "visible": true,
              "stringFieldOption": "textbox"
            },
            {
              "fieldName": "Type",
              "label": "Type",
              "isEditable": true,
              "tooltip": "",
              "visible": true,
              "stringFieldOption": "textbox"
            },
            {
              . . .
            }
          ],
          "description": "{COMMENTS}",
          "showAttachments": false,
          "mediaInfos": [
            {
               "type": "image",
               "value": {
                 "sourceURL": "{IMAGE_URL}",
                 "linkURL" : "{IMAGE_LINK_URL}" 
               } 
            },
            {
               . . .
            } 
          ]
        }
12/11/2012