On Jan 26, 11:21 am, sham rao <[email protected]> wrote: > Hi Team, > > I am using google maps in our web application. I am using the > following google's code for autozoom and centering of the map. > > var map = new GMap2(document.getElementById("map_canvas")); > var geocoder = new GClientGeocoder(); > map.setCenter(new GLatLng(37.4419, -122.1419),13); > var point = new GLatLng(lat,lng); > var marker = createMarker(point,mainDiv) > map.addOverlay(gm); > bounds.extend(point); > map.setZoom(map.getBoundsZoomLevel(bounds)); > map.setCenter(bounds.getCenter()); > > Now, the problem is that for some of the addresses, the marker is placed at > the edge of the boundary of map. I attached a sample document for this > scenerio. > There is one way to solve this problem is to increase the zoom size, but I > am looking for adjusing the whole map in a given viewport size.
This page by Esa may help: http://esa.ilmari.googlepages.com/showbounds.htm > > I request team to suggest on this and furnish a sample code for autozoom and > adjust of viewport. What team, this is a group of volunteers... > > Regards, > Sham > > Marker.doc.docx > 525KViewDownload Sorry, I'm not going to download and open a word document. -- Larry --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
