Select to view content in your preferred language

How to Lasso select some graphics and delete them?

1028
2
Jump to solution
05-13-2022 02:22 AM
YogeshSwami
Emerging Contributor

I am trying to achieve a functionality in which I want to select few points of a graphic layer among all by drawing a rectangle over them and then delete those selected points. Can anyone please help me with how to achieve this?

 

0 Kudos
1 Solution

Accepted Solutions
UndralBatsukh
Esri Regular Contributor

Hi there, 

You can do it several different ways. In any case, I set up a simple codepen app showing this. I am using SketchViewModel to draw a rectangle on the map. Then we filter the graphics that intersect with the rectangle and delete those graphics.

Here is the codepen app: https://codepen.io/U_B_U/pen/YzeppyZ?editors=1000

 

View solution in original post

0 Kudos
2 Replies
UndralBatsukh
Esri Regular Contributor

Hi there, 

You can do it several different ways. In any case, I set up a simple codepen app showing this. I am using SketchViewModel to draw a rectangle on the map. Then we filter the graphics that intersect with the rectangle and delete those graphics.

Here is the codepen app: https://codepen.io/U_B_U/pen/YzeppyZ?editors=1000

 

0 Kudos
YogeshSwami
Emerging Contributor

Thank you so much @UndralBatsukh . Worked perfectly fine.

0 Kudos