Could that explanation be included in the Class: IdentifyParameters API Reference? What is currently in the documentation is not clear on that point (hence this thread).
After discussing with a few other people, the purpose of providing an extent, height, width and dpi is so that the map service can determine the current map scale. Once the scale is known, the map service can exclude layers based on their scale dependency settings. The map service is not doing a spatial intersection based on the extent that's provided to exclude layers from the identify operation. Glad you were able to come up with a solution to get your identify time down to something relatively reasonable. For future reference, when you have hundreds of layers you need to serve, the Esri recommendation is to use multiple map services with the number of layers in a map service to something smaller, say...less than 100. Preferably less than 50.
What I learned, and will presume is correct unless others have input:1- setting identify.parameters.mapExtent=map.extent DOES NOT limit the identify task to those sublayers within the current extent.
The values for mapExtent, height, width, and dpi are used to determine the layers visible in the current extent. They are also used to calculate the search distance on the map based on the tolerance in screen pixels.
var identifyLayerIds = dojo.filter(map.layerInfos, function(layerInfo){ var mapScale = esri.geometry.getScale(map); var layer = map.getLayer(layerInfo.id); return (layer.visible && isWithinScaleRange(layerInfo,mapScale); }).map(function(visibleLayerInfo){ return visibleLayerInfo.id; }); function isWithinScaleRange(layerInfo, mapScale){ var isWithinScaleRange = true; if ((layerInfo.minScale === 0) && (layerInfo.maxScale !== 0)) { isWithinScaleRange = (mapScale > layerInfo.maxScale); } else { if ((layerInfo.maxScale === 0) && (layerInfo.minScale !== 0)) { isWithinScaleRange = (mapScale < layerInfo.minScale); } else { if ((layerInfo.maxScale !== 0) && (layerInfo.minScale !== 0)) { isWithinScaleRange = (mapScale < layerInfo.minScale) && (mapScale > layerInfo.maxScale); } } } return isWithinScaleRange; }
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.