Select to view content in your preferred language

JSON Operational Layer and Base Layers

1678
1
05-14-2013 12:06 PM
DanielJohns
Frequent Contributor
I'm having issues getting my operational layers to show along with the baseMapLayers. If use the existing Esri rest service URL it will appear. Once I add the baseMapLayers, the operational layers stop working. The baseMapLayers will show up, but the operation layers only appear in the legend and not on the map.

If I create a dynamicLayer and add it to the map it will work fine, but I would prefer to use JSON if possible.

Can someone assist me with this?

Thank you


                             webmap.itemData = {
     "operationalLayers" : [{
      "visibility" : true,
      "opacity" : 1,
      "url" : "http://svr/server/rest/services/UtilityLayers/MapServer",
      "title" : "Utility Layers"
     }],
     "baseMap" : {
      "baseMapLayers" : [{
       "opacity" : 1,
       "visibility" : false,
       "url" : "http://svr/server/rest/services/Aerial/MapServer"
      }, {
       // "isReference" : true,
       "opacity" : 1,
       "visibility" : true,
       "url" : "http://svr/server/rest/services/BaseLayers/MapServer"
      }],
     },
     "version" : "1.6"
    };

0 Kudos
1 Reply
KellyHutchins
Esri Notable Contributor
Daniel,

Take a look at the ArcGIS Web Map JSON format documenation. There are several examples there and it might help to compare those examples to your own.

http://resources.arcgis.com/en/help/arcgis-web-map-json/#/Web_map_format_overview/02qt00000007000000...


Are your service urls public? If so can you send them along?

Kelly
0 Kudos