bluehalo / ngx-leaflet-draw

MIT License
88 stars 29 forks source link

How to get the edge of a polygon drawn on map within map? #85

Open silvermind20 opened 4 years ago

silvermind20 commented 4 years ago

How can I implement a listener when the user clicks exactly on the edge of the drawn polygons and get the lat and lng of that edge? I know a similar situation can be implemented with Google Map API like the code below, but I can not find any source to help me implement the same thing in Leaflet Draw. google.maps.event.addListener(polygon, 'click', function (event) { console.log(event.edge) } Google Map Documentation: https://developers.google.com/maps/documentation/javascript/reference/polygon#PolyMouseEvent