The result may or may not be the same. For example a point which may be within the extend of a polygon may actually outside that polygon.
Ok, I understood that part, but I was wondering what's the best approach, and if the final result will be the same.
your approach used the extent of map.graphics.graphics as query.geometry while mine merged map.graphics.graphics into one geometry and used that geometry as query.geometry.
Thanks for your response, but I accomplished the some thing (I think) using:esri.graphicsExtent(map.graphics.graphics)It seems to work fine, but can you tell me the difference between this solutions and yours?
esri.graphicsExtent(map.graphics.graphics)
geometries = esri.getGeometries(map.graphics); geometryService.union(geometries, function(geometry){ query.geometry =geometry; ... });
Hi there,I'm trying to create a function that performs a query on the map based in the current map.graphics. Is there an easy way to add map.graphics to the geometry parameter, besides going trough the map.graphics.graphics array to find the extents?Thanks
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.