I got a google map and I load it but I want to change the direction or center by changing the center,how can I do this? I got a code like this to load the map:
function putmap(x) {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("Map"));
// Create new geocoding object
geocoder = new GClientGeocoder();
// Retrieve location information, pass it to addToMap()
geocoder.getLocations(x, addToMap);
}
}
I want to change the value of x by say entering a new value on the textbox how can I do this...
Well, you change the center by doing
Look here for more detail. If you know the zoom level you want, you can use that instead of
map.getZoom().