laptop and a wrench

Bug

Min scale and Max scale for dynamic map service resource shows value “0” despite the layers within the service having max and min scale values.

Last Published: August 31, 2014 ArcGIS for Server
Bug ID Number NIM086859
SubmittedNovember 28, 2012
Last ModifiedApril 2, 2025
Applies toArcGIS for Server
Version found10.1.1
Operating SystemWindows OS
Operating System Version2008 R2 64 Bit
StatusWill Not Be Addressed

Additional Information

We apologize that we were unable to address this issue within the current product support cycle. If the issue continues to affect your work in a supported release, please contact Technical Support.

Workaround

-Using JavaScript-<script type="text/javascript"> dojo.require("dijit.layout.BorderContainer"); dojo.require("dijit.layout.ContentPane"); dojo.require("esri.map"); var app = {}; function init() { app.map = new esri.Map("map", { extent : new esri.geometry.Extent({ "xmin" : -9814575.960268047, "ymin" : 5122979.367562321, "xmax" : -9814378.157372441, "ymax" : 5123151.452906492, "spatialReference" : { "wkid" : 3857 } }) }); dojo.connect(app.map, "onLayerAdd", onLayerAdded); app.baseMapLayer = new esri.layers.ArcGISTiledMapServiceLayer( "<a href="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" target="_blank">http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer</a>"); app.map.addLayer(app.baseMapLayer); app.scaleDependentDynService = new esri.layers.ArcGISDynamicMapServiceLayer( "<a href="http://sampleserver6.arcgisonline.com/arcgis/rest/services/CommunityAddressing/MapServer" target="_blank">http://sampleserver6.arcgisonline.com/arcgis/rest/services/CommunityAddressing/MapServer</a>", { "id" : "Point Layer" }); app.map.addLayer(app.scaleDependentDynService); // There is only one layer in this service dojo.connect(app.map, "onExtentChange", function(extent) { dojo.byId("name").innerHTML = "Is " + <a href="http://app.scaleDependentDynService.id" target="_blank">app.scaleDependentDynService.id</a> + " visible at scale 1:" + esri.geometry.getScale(app.map) + "?"; if (app.scaleDependentDynService.isVisibleAtScale(esri.geometry .getScale(app.map)) == true) { dojo.style("answer", "color", "green"); dojo.byId("answer").innerHTML = "Yes"; } else { dojo.style("answer", "color", "red"); dojo.byId("answer").innerHTML = "No"; } }); } function onLayerAdded(serviceLayer) { if (serviceLayer.declaredClass == "esri.layers.ArcGISDynamicMapServiceLayer") { populateScales(serviceLayer); } } function populateScales(serviceLayer) { var temp = []; dojo.forEach(serviceLayer.layerInfos, function(layer) { temp.push(layer.minScale); temp.push(layer.maxScale); }); var scaleRange = temp.sort(function(a, b) { return a - b }); serviceLayer.minScale = scaleRange[scaleRange.length - 1]; serviceLayer.maxScale = scaleRange[0]; } dojo.addOnLoad(init);</script>

Steps to Reproduce

Bug ID: NIM086859

Software:

  • ArcGIS for Server

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options