set bounds programmatically on server

Nov 21, 2009 at 3:42 PM


Is there a way that I can set the map's bounds programmatically on the server, to let the map calculate the zoom level automatically?



Nov 23, 2009 at 5:55 AM

I have the same issue.

Here is how to do it if you're not using the GoogleMap control.

map = new GMap2(map_field);
var minZoom = map.getBoundsZoomLevel(allowedBounds);
map.setCenter(new GLatLng(centreY, centreX), minZoom);