I am looking into how websites using google maps are put together and I want to access map elements on these website interactively using the firebug console.
For example, with this link…
http://maps.google.co.uk/maps?q=eh13&hl=en&z=12&vpsrc=0
You can type into the console:
gApplication.getMap().getCenter();
And the latitude & longitude will be printed.
However for this link…
http://www.primelocation.com/uk-property-for-sale/search/?p=eh13&ls=0
I cant figure out how to refer to the map in javascript and how I can find the coordinates of each of the map markers.
Any help on how to analyse websites like this would be appreciated.
They have an ‘object’, Maps, they’ve created to handle their map. They store it in the variable window.map. You can get the center of the map by typing this in the console:
Here is where they define the object:
http://www.primelocation.com/content/scripts/map/tdpgmap.js