A
A
Alexander Shapovalov2014-02-12 14:35:31
JavaScript
Alexander Shapovalov, 2014-02-12 14:35:31

How to get the coordinates of a moved marker in Google Maps?

Hello, the task is to get the coordinates of the marker after moving it around the map, I found the code for this here: https://developers.google.com/maps/documentation/j...
But which method returns the position of the marker on the map?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Meketyuk, 2014-02-16
@shapovalov_org

google.maps.event.addListener(marker, 'dragend', function(e) {
    console.log(e.latLng);  // Координаты маркера
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question