On Aug 2, 6:14 am, capo75 <[email protected]> wrote:
> Hi,
>
> I am trying to obtain the same result as this (sorry about the Google
> api server reject error, I have created 4 new API keys but I still get
> the error...I will look into this later.)
>
> http://dev.capisani.co.uk/form.aspx
>
> If you select Europe the map will be centred for Europe, if you select
> Italy from the second dropdown the map will be centred for Italy and
> it will zoom in, if then you select Milan the map will zoom in even
> more and Milan will be at the center of the map.
>
> At the moment I am doing the zooming using some if statements based on
> the selected value in the drop down lists but it's not a nice way of
> doing this.
>
> Do you know how I can achieve the same result just using google map
> API?
>
If you are willing to wait for the geocoder to return its results,
there is additional data available which can be used to calculate the
best zoom level in the "ExtendedData" field:

  "ExtendedData": {
    "LatLonBox": {
      "north": 40.8811521,
      "south": 40.7460351,
      "east": -96.5745606,
      "west": -96.8306794
    }

Your mileage may vary.

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