HTML Popup (Map Service\Dynamic Layer)

Description

The htmlPopup resource provides details about the HTML popup authored by the user using ArcGIS Desktop.

This resource is available when a dynamicLayer resource's htmlPopupType is not esriServerHTMLPopupTypeNone.

Request Parameters

Parameter

Details

layer

//Required parameter.

Description: Use this parameter to define a dynamic layer. Only dynamic map layers are supported.

NoteNote:

Use gdbVersion on dynamic map layer definition to specify an alternate geodatabase version.

Syntax:

{
    "id": <layerOrTableId>, // optional
    "source": <layer source>, // only dynamic map layers are supported
}

Example:

{
  "id": 101,
  "source":
  {
    "type": "mapLayer",
    "mapLayerId": 0,
    "gdbVersion": "SDE.DynamicLayers"
  }
}

f

Description: The response format. The default response format is html.

Values: html | json

Example Usage

Example 1:

http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/dynamicLayer/1/htmlPopup?layer={"id":101,"source":{"type":"mapLayer","mapLayerId":2}}&f=pjson

JSON Response Syntax

{
  "htmlPopupType" : "<esriServerHTMLPopupTypeNone | esriServerHTMLPopupTypeAsURL | esriServerHTMLPopupTypeAsHTMLText>",
  "content": "<htmlContent>"
}

JSON Response Example

{
  "htmlPopupType" : "esriServerHTMLPopupTypeAsHTMLText",
  "content": "A Sample HTML pop up." 
}

10/6/2017