'dynamicLayers' is not enabled on this MapService.

3076
2
Jump to solution
10-10-2014 04:45 PM
RobertScheitlin__GISP
MVP Emeritus

Is there a way to check if dynamicLayers are supported by a map service though the API or do I have to just parse the json request manually to get the "supportsDynamicLayers": false

0 Kudos
1 Solution

Accepted Solutions
KellyHutchins
Esri Frequent Contributor

ArcGIDDynamicMapServiceLayer has a property called supportsDynamicLayers you can use to test this. Looks like this property has not been documented. I'll make sure it gets documented for the next release. In the meantime here's an example showing how this works.

      var layer = new ArcGISDynamicMapServiceLayer("http://sampleserver5.arcgisonline.com/ArcGIS/rest/services/Energy/Geology/MapServer");

      layer.on("load", function(){

        console.log(layer.supportsDynamicLayers);

      });

      map.addLayer(layer);

View solution in original post

0 Kudos
2 Replies
KellyHutchins
Esri Frequent Contributor

ArcGIDDynamicMapServiceLayer has a property called supportsDynamicLayers you can use to test this. Looks like this property has not been documented. I'll make sure it gets documented for the next release. In the meantime here's an example showing how this works.

      var layer = new ArcGISDynamicMapServiceLayer("http://sampleserver5.arcgisonline.com/ArcGIS/rest/services/Energy/Geology/MapServer");

      layer.on("load", function(){

        console.log(layer.supportsDynamicLayers);

      });

      map.addLayer(layer);

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Kelly,

   Thanks for confirming supportsDynamicLayers property on ArcGISDynamicMapServiceLayer does exist.

0 Kudos