arnaudleclerc / AzureMapsControl.Components

Razor Components for azure-maps-control
MIT License
34 stars 12 forks source link

Erase-Geometry Option? #73

Open jhenzel opened 2 years ago

jhenzel commented 2 years ago

Browsing through the source code I notice that no Erase-Geometry option is available as is on the pure JavaScript side. This sample from Microsoft illustrates it

[https://github.com/Azure-Samples/AzureMapsCodeSamples/blob/vnext/Samples/Drawing%20Tools%20Module/Drawing%20toolbar%20options/Drawing%20toolbar%20options.html]

In lieu of this option no available on the map, what do you recommend for deleting polygons, etc. drawn on the map? The only way I see so far is to use edit-geometry, select the object and use the delete key. Definitely workable but not intuitive for most of my users

arnaudleclerc commented 2 years ago

I assume you added your shapes or features to a data source, did you? The datasource itself has methods to remove objects from a layer.

Is this what you're looking for?

jhenzel commented 2 years ago

Not quite. Requirement is for use to select an area of interest using the tools.

PhilpD commented 1 year ago

I have a similar requirement. It would be good to have the DrawingManager available. so you could pass in your data layer and get the built in editing etc.

sameerconsforc commented 11 months ago

I'm dealing with a similar issue—trying to remove a geometry point created using DrawingToolbarOptions in Azure Maps. I'm struggling to figure out how to activate or utilize the delete button feature in the code. This problem is really holding me back in advancing my project. How can I clear all the geometries?