On Sep 30, 2008, at 5:32 PM, flow wrote:

> a static maps request contains the zoom level, center coordinates and
> size of the map.
>
> I would like to request an other map-Server with the same coordinates,
> but this Server (it's a WMS) excpects a coordinate boundinbox (left
> bottom and top right corners) instead of zoom level and center
> coordinates. Is it possible to find out this envelope or does anbody
> know how I can calculate the boundingbox exactly.


I was not planning on going public yet. It is all alpha quality code.  
But demo for what you described can be found in bottom of this page.

http://www.appelsiini.net/projects/php_google_maps/basic.html

Basically you can do something like:

-cut-
require_once 'Google/Maps.php';

$map = Google_Maps::create('static');

$map->setSize('540x300');
$map->setCenter(new Google_Maps_Coordinate('58.368488', '26.768908'));
$map->setZoom(8);
print_r($map->getBounds());
-cut-

Which would print out:

-cut-
Google_Maps_Bounds Object
(
     [min_lon:protected] => 25.2857536823
     [min_lat:protected] => 57.9336988062
     [max_lon:protected] => 28.252062276
     [max_lat:protected] => 58.7979862032
)
-cut-

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