Selecting and removing graphic (by rings array) in ArcGIS JSapi 3.x

1130
2
Jump to solution
10-08-2019 12:49 PM
by Anonymous User
Not applicable

I am using JSAPI 3.x.

I have graphic layer in Feature Layer and I want to select and remove graphic (by rings) one by one. How can I achieve that?

As of now when I select graphic, it select the whole graphic and .clear() or .remove() doesn't work.

Select and remove graphic based on these rings array

Robert Scheitlin, GISP‌, Robert seen your answers regarding adding/editing graphics. thought you be the best person to help me out here.

thanks 

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Guri,

   So are you using a editable Feature Service?

You are not going to be able to select a particular ring of a polygon without taking that ring and adding it to the map as a new graphic.

deleting the ring is not very hard as there is a remove ring method on the polygon class.

https://developers.arcgis.com/javascript/3/jsapi/polygon-amd.html#removering 

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Emeritus

Guri,

   So are you using a editable Feature Service?

You are not going to be able to select a particular ring of a polygon without taking that ring and adding it to the map as a new graphic.

deleting the ring is not very hard as there is a remove ring method on the polygon class.

https://developers.arcgis.com/javascript/3/jsapi/polygon-amd.html#removering 

by Anonymous User
Not applicable

Thanks Robert,

Yes it is editable Feature service and will give that a try and see how I go.

0 Kudos