Good morning, I need to generate a maker when the person clicks on the map, obviously the maker has to be generated and give me the latitude and longitude, will this be possible? From already thank you very much
Take a look at this fiddle: http://jsfiddle.net/b2g1Lt9y/
The important bits are to:
<l-marker> tag with a v-for that points to an array of markers@click (or v-on:click) event handler on your map that binds to a method in your componentaddMarker) has an event, which conveniently supplies the latlng of where the user clicked. So you only need to add this latlng to your array of markersThank you, this worked for me.
Most helpful comment
Take a look at this fiddle: http://jsfiddle.net/b2g1Lt9y/
The important bits are to:
<l-marker>tag with av-forthat points to an array of markers@click(orv-on:click) event handler on your map that binds to a method in your componentaddMarker) has an event, which conveniently supplies thelatlngof where the user clicked. So you only need to add this latlng to your array of markers