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!
Solved! Go to Solution.
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.
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,