How to get latitude and longitude of google map center

Please tell me how I can deploy an event right after a user changes his position on a Google map using a drag and drop card and getting the latitude and longitude of the center of the Google map, and miles - showing from the center. i have many google pages related to it .. but not able to solve it .. please give me a solution (I use asp.net and javascript)

+3
source share
2 answers

GEvent.addListener(map, "moveend", function() {
  var center = map.getCenter();
});

+4
source

moveend() dragend() (reference) getCenter() , google map api, : http://groups.google.com/group/google-maps-api

+1

Source: https://habr.com/ru/post/1731853/


All Articles