There are several ways to have an event fire when a geometry is clicked:
- Add a click event to the layer that displays the geometry.
- Add a click event to the map and look to see what geometries are clicked (you will likely end up with a bunch of the base map geometries mixed in like roads and things that you will have to filter through).
It sounds like you want to be able to click a geometry and then put it into edit mode or erase it. In that case it is best to use the drawing tools module for Azure Maps and then add your geometry to the data source of the drawing manager. That automatically adds the required events for you. Then you just click the edit or erase button from the drawing tool bar. Here is a code samples for this: https://samples.azuremaps.com/?search=drawing&sample=load-data-into-drawing-manager