To bad. I'll pick a standard zoom then.
Thanks.

On 2 Sep., 14:32, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> On Sep 2, 4:39 am, crispy <[EMAIL PROTECTED]> wrote:
>
> > Update: it works!
> > It was the preserveViewport thing.
> > I had some small errors in my code that messed the up at first.
>
> > The problem with loading all mini maps at once is solved too.
>
> > On more question though, is there a way to tell
> > mini_map.setCenter(new GLatLng(lat,lon),zoom_level); to use the
> > highest available zoom for that area? That would be great.
>
> Not unless you know what it is.  There have been threads about finding
> it programmatically, but nothing that I can recall which was the
> "right" answer.  The API doesn't provide that information.
>   -- Larry
>
>
>
> > Thanks for your help guys!
>
> > On 2 Sep., 09:54, crispy <[EMAIL PROTECTED]> wrote:
>
> > > Esa - sorry about that, the php bit bascially fills in the "from" and
> > > "to".
>
> > > Rossko - the panTo() does fail :( I tried that already.
> > > Am I using the {preserveViewpoint:true} correctly like this:
>
> > > sdir.load("from: a to: b", {'preserveViewpoint': 'true'});
>
> > > You understood correctly. I just want to show a little map, with just
> > > that step of the route on it.
> > > But each mini_map should also have the direction on them, of course
> > > there will only be a little part of the directions visibile.
>
> > > Yes, the "from" and "to" are coming out of a DB, the user already
> > > confirmed elsewhere where he wants to go.
> > > So I fill in the from and to, then I show a big map (which works),
> > > then I parse an XML file containing the information for each step
> > > and show a list of directions (I have to do this with XML because JS
> > > won't work everywhere), then I want to show a mini map
> > > for each step, called by the function above "show_mini_map". That's
> > > what I want to / have to do.
> > > Basically, it's just like the google print page for driving directions
> > > (link posted in first post). But I can't get those mini maps to focus
> > > to the current step.
>
> > > I hope you know what I mean now, sorry for being unclear.
>
> > > Thanks.
>
> > > On 2 Sep., 00:55, Rossko <[EMAIL PROTECTED]> wrote:
>
> > > > > and it still fits the whole route..?
>
> > > > Compare and contrast -
> > > >     mini_map.setCenter(new GLatLng(lat_lon));
> > > >     ....
> > > >     mini_map.panTo(lat_lon);
> > > > I think the panTo() will fail.
> > > > But in fact you don't need it all if you get the
> > > > {preserveViewpoint:true} as already advised; the panTo() would just
> > > > set the same centre as the setCenter() already has.
>
> > > > Neither of those affect the zoom at all.  However I'm not all sure you
> > > > really want to {preserveViewpoint:true}, don't you want to show just
> > > > the one step?
>
> > > > If I understand you right, you are using this function show_mini_map()
> > > > to show just one step from a set of directions.
> > > > I can see you are using PHP to fill-in the 'from:' and 'to:'
> > > > parameters inside the function.
> > > > You do understand that PHP fills those in before even the page is sent
> > > > to the user's browser, and no matter what the user clicks on it won't
> > > > affect the values in the function?
>
> > > > What I don't understand is why, when you have all the steps already
> > > > for the 'big' directions, you are trying to get directions for each
> > > > step all over again!
>
> > > > cheers, Ross K
>
> > > >      mini_map.panTo(lat_lon);
> > > > isn't going to change the zoom level.
> > > > Do you really mean 'zoom', or do
>
> > > > > On 1 Sep., 17:39, Mike Williams <[EMAIL PROTECTED]> wrote:
>
> > > > > > GDirections.load() is asynchronous, and, unless you specify
> > > > > > {preserveViewpoint:true} it centres and zooms the map to fit the 
> > > > > > entire
> > > > > > route when the reply comes back from the server.
>
> > > > > > Your panTo occurs immediately after the GDirections request is 
> > > > > > sent, so
> > > > > > it gets countermanded when the GDirections reply comes back.
>
> > > > > > --http://econym.googlepages.com/index.htm
> > > > > > The Blackpool Community Church Javascript Team- Hide quoted text -
>
> > > > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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