WebFeb 14, 2014 · Try something along these lines, using union to grow the extent to encompass all features: var extent = featureSet.features [0].geometry.getExtent (); for (var i = 1; i < featureSet.features.length; i++) { extent = extent.union (featureSet.features.geometry.getExtent ()); } Reply 2 Kudos by JohnathanBarclay 02-16 … Web@Kirk's answer works and is simple, but I didn't like that it would zoom all the way in and then zoom out a little. The method I can up with is to find the map extent at the smallest scale and compare that to my extent.
Zooming to query result extent - Esri Community
WebThe FeatureLayer API provides a method called queryExtent (), which allows you to calculate the full extent of features at runtime that satisfy a given query. If no query parameters are set, then the method queries for the extent of all features in the layer according to its definitionExpression. WebMay 31, 2024 · I am using query url parameter to focus on a feature. The query works well, but - the zoom level is too close. I changed the zoom level inside the "MapUrlParamsHandlerfile" in the jimu.js folder: query.maxAllowableOffset = 0.00001; layer.layerObject.queryFeatures (query).then (function (featureSet) {. var features = … how does diluted vinegar burn belly fat
Using ESRI Javascript 4.0 API with Require JS - Stack Overflow
WebAug 7, 2013 · var extGraphics = GraphicsUtils.graphicsExtent(map.graphics.graphics); Check extGraphics value after executing the above line. If the value is not what you expected, check map.graphics.graphics to see how many graphics there. To be safe, I would use featureSet to get the graphics array. http://www.axentgraphic.com/ WebDescription. (Added at v3.8) Utility methods for working with graphics. When coding legacy (non-AMD) style, there is no need to require the module. All methods and properties are … how does dio know about heaven