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