The geocoder returns an ExtendedData section that represents the box that maps.google.com uses to determine the zoom. Note that the Lat/Lng box isn't a perfect fit for the target location. It's just there to provide sensible zooming.
For example, try typing "Oxford" into this page: http://econym.org.uk/gmap/example_geo3.htm The blue rectangle indicates the geocoder ExtendedData.LatLonBox. You could calculate the lat and lng distances of the corners from the centre and add a percentage. Using the variables of example_geo3.htm that would look something like: var percent = 15; var cLat = result.Placemark[0].Point.coordinates[1]; var cLng = result.Placemark[0].Point.coordinates[0]; N += (N-cLat)*percent/100; S += (S-cLat)*percent/100; W += (W-cLng)*percent/100; E += (E-cLng)*percent/100; var bounds = new GLatLngBounds(new GLatLng(S,W), new GLatLng(N,E)); Or you could use the EOffset() function from eshapes.js NE = EOffset(new GLatLng(N,E), 5*1609.344, 5*1609.344); SW = EOffset(new GLatLng(S,W), -5*1609.344, -5*1609.344); [There are 1609.344 metres in a mile.] -- Mike Williams http://econym.org.uk/gmap --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
