Is there a way to determine whether a layer is switched on, but is not currently shown due to the scale threshold?See the attached file for an example. When the map first loads, the counties layer is "on" but is not shown due to the map scale. Zoom in a level and and the counties appear.How can I determine this programmatically? featureLayer.visible returns "true" at all scales. featureLayer.onVisibilityChange doesn't fire when the scale threshold is crossed.The workaround is to check the current map scale (by finding the LOD and figuring out the corresponding scale?) and compare it to the layer's minScale and maxScale. This seems like a clumsy workaround - is it the only option?Thanks,Steve
Would they be able to use the getscale method for the map?http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/namespace_geometry.htm#getScale
This clumsy workaround is the only one I could come up with as well, due to the exact limitation you listed.
Sounds like an enhancement request for Esri.We'd need a boolean property for "will display at the current scale". This should apply to featureLayers and tiledMapServiceLayers, and for each layer of a dynamicMapServiceLayer.Cheers,Steve
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.