I got a solution that sort of works using geoXml.gotoDefaultViewport
(map);

The only problem now is that the map now "jumps" initially from the
zoom level to the zoom level set by gotoDefaultViewport (see
http://socialect.com/places/1411)

I can't remove setting the zoom level (using map.setCenter(point, 15))
because without it the map doesn't render... Is there a solution so
that the map doesn't jump between the 2 zoom levels?


On Apr 4, 11:30 am, "[email protected]" <[email protected]>
wrote:
> On Apr 3, 9:54 pm, vince <[email protected]> wrote:
>
> > I'm currently letting users define their own boundaries for places
> > (e.g.http://socialect.com/places/1411).  I then output the polygon as
> > a kml file (e.g.http://socialect.com/assemblies/1411/boundary.kml)
> > which I add as an overlay.
>
> > My question is, how can I set the zoom level of the map so that it
> > properly shows the full boundary?   Create a  GLatLngBounds out of
> > GPolygon or GGeoXml maybe?
>
> GPolygon has a .getBounds() method.
> GGeoXml has a getDefaultBounds()  
> method.http://code.google.com/apis/maps/documentation/reference.html#GGeoXml...
>
> You can auto zoom and center the map to fit a bounds with:
> map.setCenter(bounds.getCenter(),map.getBoundsZoomLevel(bounds));
>
>   -- 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