How do you manage graphics with the ArcGIS JavaScript API?
Specifically, I want to delete all graphics that intersect a polygon. How do I do that?
I have graphics in Feature Layers.
Thanks!
Jerry,
You would loop through the Graphics Layers graphics to see if the graphics.geometry is contained in the test polygon. Polygon class has a contain method that take a geometry as a parameter. If the polygon contains the geometry then you use the GraphicsLayers.remove method that take a graphics as its parameter. Hope this helps.
Robert,
is there any sample regarding graphic overlap checking...?!
thanks,
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.