how i put markers with clicks?

4 posts / 0 new
Last post
reinel215
how i put markers with clicks?

HI!! now this is my doubt i need have a map on my page. then, when the user do it a click on the map put a marker there.... the map is colocate and i know that put markers statics but i cant with the markers with the click.    HELP


MQBrianCoakley
You can use something like
You can use something like map.on('click', function(e){console.log(e.latlng.lat + "," + e.latlng.lng)}); to grab the latLng and create a marker from that latLng.

reinel215
omg ty

omg ty


MQBrianCoakley
yw!
yw!