On Sep 1, 8:00 am, jrawr <[email protected]> wrote: > 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.
The distance across the top and across the bottom will be different. distance across the top in meters (assuming the GMap2 object is "map"): map.getBounds().getNorthEast().distanceFrom(new GLatLng(map.getBounds().getNorthEast().lat(),map.getBounds().getSouthWest().lng())) -- Larry > > I need this because I want to search for videos on YouTube, and since > YT doesn't currently support bounding boxes (as Flickr does), I need > to manually input the centre location and the distances of the map > bounds as a radius. > > Hopefully I've been clear enough, and thanks in advance for the help. -- 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.
