> I was wondering if there was a way to find the distance in km, miles w/ > e of a Google map - so, the user has the map at a certain zoom, and I > need to know what the distance is between the top of the map and the > bottom, and the left and right.
Get the bounds of the map http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GMap2.getBounds Isolate the corners of interest http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GLatLngBounds.getSouthWest Get the distance between those corners http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GLatLng.distanceFrom or between to the if you like http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GLatLngBounds.getCenter -- 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.
