Hi Cristopher!
I think that I reply to Google Maps Api Group, not directly to you.
Francesco
On 4 Nov, 14:41, Christopher <[EMAIL PROTECTED]> wrote:
> *Why are you emailing me this?*
>
> On Tue, Nov 4, 2008 at 7:34 AM, Francesco <[EMAIL PROTECTED]> wrote:
>
> > Thanks for yours indications.
>
> > var dir2sw=dir2.getBounds().getSouthWest();
> > > var dir2ne=dir2.getBounds().getNorthEast();
> > > and then add them to the first's bounding rectangle:
> > > var dir1rect=dir1.getBounds();
> > > dir1rect.extend(dir2sw);
> > > dir1rect.extend(dir2ne);
> > > and then use the result to set the map's centre and zoom:
>
> > > map.setCenter(dir1rect.getCenter(),map.getBoundsZoomLevel(dir1rect));
>
> > I try it, but it doesn't work. Instead, I try with:
>
> > function onGDirectionsLoad(){
> > var bounds =
> > dir2.getBounds().extend(dir1.getBounds().getSouthWest());
> > map.setCenter(bounds);
> > }
>
> > and it seem work fine (Is this the best way to reach my scope?).
> > But if I try with
> > map.setCenter(bounds.getCenter(),map.getBoundsZoomLevel(bounds)) it
> > doesn't work too, and I don't understand why.
>
> > Francesco
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---