Say I have a given a link to a map with a location marker , how can I find the latitude and longitude from that map marker using JavaScript and the Google API?
The trick is that I don’t know the address. Is there a way to find out what the address on the page is elegantly, without having to use regular expressions on the HTML?
Specifically, I want to extract the address and latitude/longitude out of the given marker.
That’s ‘easy’. Google Maps api has a geolocation object, that is the same used by google maps. So you should use something like that: