1

Is there any way I can get a list of all the graphics currently on the map? I was thinking that there would be something along the same lines as adding a graphic to a map such as map.graphics.getGraphics(). I am using the ArcGIS API for javascript.

3

Assuming your instance of map does not have additional GraphicsLayers added, map.graphics.graphics would return an array of all the graphics currently in the map. If you have added GraphicsLayers, you'd have to loop through each of those as well.

ArcGIS JS API - Map graphics

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.