views:

63

answers:

3
+2  A: 

Well, you change the center by doing

map.setCenter(new GLatLng(lat, lng), map.getZoom());

Look here for more detail. If you know the zoom level you want, you can use that instead of map.getZoom().

Anthony Mills
If you don't want to change the zoom, you don't need to specify it. Just use: map.setCenter(new GLatLng(lat, lng));
Chris B
A: 

Are you using the Map2 API? If so, just use the setCenter() method:

var map = new google.maps.Map2(document.getElementById("map"));
map.setCenter(new google.maps.LatLng(0, 0), 2);

See the docs for more help getting started.

jheddings
A: 

Give your textbox an id, then you can write

geocoder.getLocations(document.getElementById("mytextbox").value, addToMap);

Mike Williams