I
I
Ivan Damaskin2015-08-04 20:43:26
JavaScript
Ivan Damaskin, 2015-08-04 20:43:26

How to insert marker coordinate data into url?

Hello. Here is my interactive map 999pmr.md/maps
I want to add marker coordinates to url
I have included leaflet-hash plugin - https://github.com/mlevans/leaflet-hash
Location coordinates are transferred perfectly along with zoom.
Now, through leaflet draw, if you add a marker to the map, you need the coordinates to be added to the url and the user can send the link to a friend and he will see the same location with the marker by clicking on the link.
I will be very grateful to everyone who helps with an example (jsfiddle or plunk).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2015-08-13
@servdo

See the api of the maps you are using. It's all there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question