Map configuration
The following table describes the attributes for map configuration.
Attribute | Description |
---|---|
3D | Boolean. Identifies whether the map is 3D or 2D. If both 3D and 2D are true, it’s an app with the ability to switch between 3D and 2D (not supported in this version). The default is false. |
2D | Boolean. Identifies whether the map is 2D or 3D. If both 2D and 3D are true, it’s an app with the ability to switch between 2D and 3D (not supported in this version). The default is true. |
itemId | String. Identifies webmapID or websceneID. |
mapOptions | Object. This property is the same as the map API. |
position | Object. This property is the same as the widget position. |
portalUrl | String. The URL where the web map is hosted. If not set, the app's portalUrl property is used. |
appProxy | Object. Contains the proxy information for the premium map service layer. It has the following two properties:
|
mapRefreshInterval | Optional. Indicates how often the map refreshes.
The default value of the useWebMapRefreshInterval property is true.
|
Example
"map": {
"3D": false,
"2D": true,
"portalUrl": "",
"itemId": "",
"position": {
"left": 0,
"top": 0,
"right": 0,
"bottom": 30,
"width": 100,
"height": 100
},
"mapOptions": {
"extent": {
"xmin": 20, "xmax": 30, "ymin": 40, "ymax": 50, "spatialReference": {"wkid": 4326}
},
"center": "",
"level": 3
},
"appProxy": {
"mapItemId": "6ba5d2b530a84d9d87e217aff44f3cbf",
"proxyItems": [
{
"sourceUrl": "http://demographics1.arcgis.com/arcgis/rest/services/USA_Demographics_and_Boundaries/MapServer",
"title": "USA_Demographics_and_Boundaries",
"consumeCredits": true,
"useProxy": true,
"proxyUrl": "http://utility.arcgis.com/usrsvcs/appservices/RPSyFj4IiBPxqMbd/rest/services/USA_Demographics_and_Boundaries/MapServer",
"proxyId": "RPSyFj4IiBPxqMbd"
}
]
}
},