Shanghai Map Finder

By Jian Shuo Wang on 2007-01-19 17:22 · Map

This is a helper page to get the HTML code of a place in Google Map, so I can copy and paste it into my blog.

Lat, Lng

HTML:

if (GBrowserIsCompatible()) {

var map = new GMap2(document.getElementById(“map”));

map.addControl(new GSmallMapControl());

map.addControl(new GMapTypeControl());

map.setCenter(new GLatLng(31.210117,121.497175), 13, G_SATELLITE_MAP);

GEvent.addListener(map, “moveend”, function() {

var center = map.getCenter();

document.getElementById(“message”).innerHTML = center.toString();

document.getElementById(“lat”).innerHTML = center.lat();

document.getElementById(“lng”).innerHTML = center.lng();

document.getElementById(“zoom”).innerHTML = map.getZoom();

}

);

}

1 Comments
Hey Guys,

I found this map which I feel more practical than the google map:

http://www.mapandcity.com/shanghai-map.html

How do you think?
— Louis · 2010-06-07 19:41