On Feb 8, 5:08 pm, Manu <[email protected]> wrote: > I've done extensive research on this topic, but I haven't been able to > find information on how to obtain the lat/lon bounds for a map that is > returned using the Static Maps API.
To get the exact bounds, I don't think there is any other way than using the projection to do the calculations, based on center, zoom and map size. However, if you're only at zoom 13 and higher, and the latitudes do not vary much, you could just use the API to calculate an approximate delta latitude, (height), and delta longitude, (width), and hold those values in an array. Perhaps if you tell us what you need the bounds for, we might be able to suggest a better approach. -- Marcelo - http://maps.forum.nu -- > > For example, suppose I enter this > query:http://maps.google.com/maps/api/staticmap?center=Brooklyn+Bridge,New+... > > How do I then obtain the lat/lon bounds for the bottom-right and top- > left pixels? Is there a scaling factor from the 'zoom' and 'center' > parameters to the lat/lon bounds for the image, without having to get > into the nitty-gritty of map projections? I just need a quick-and- > dirty approximation of a linear scale factor, since I'm looking at > zoom factors of 13 and higher, where map distortions aren't terribly > significant in my application. > > Can I access this information using a JSON script or some other return > mechanism? Oh, please let there be! Feel free to let me know if I'm > barking up the wrong tree. > > I've looked through the API here > already:http://code.google.com/apis/maps/documentation/staticmaps/ > > My thanks in advance. > > Manu -- 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.
