On Oct 29, 2008, at 7:38 PM, Alejo83 wrote:

> I am having trouble calculating the best zoom level for a given
> MaxLat, MinLat, MaxLng, MinLng values.
>
> I found this javascript code through this group, which I translated
> into Java (my server-side programming language). The problem is with
> the scale, that doesn't work well.


JavaScript API can do that by default. If you need serverside code  
(for example working with static maps) check the following PHP code.  
Especially zoomToFit() and getBounds() methods. You should  be able to  
port it to Java easily.

http://github.com/tuupola/php_google_maps/tree/master/Google/Maps/Static.php

--
Mika Tuupola
http://www.appelsiini.net/


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to