I accidentally posted my problem on Flash API and am now posting here
(by request from Pamela Fox) my problem and fix.

For some reason the panTo is not working.  The lat long reverts back
to the lat long
I had used in my setCenter (during map initialization) but my setZoom
works just
fine. From alerts, I see that I'm using the correct lat long values
for the panTo
argument list.

using php I do: echo 'map.panTo(new GLatLng('. $lat .','. $lng.'));';
desired pan: $lat = 38.33, $lng = -120.93
actual pan: 37, -120

Also, when I had used set center to change the lat/long, it had
worked.
Here is my url: http://www.arb.ca.gov/aqmis2/aqmis2_gmap.php

*********************************************************************************
add on to my comment above:

I tried to put lat/long in to the code directly, but it still didn't
work.
map.panTo(new GLatLng(36.77, -119.77)) Is there a specific place that
the panTo code needs to be?

********************************************************************************
I fixed my issue by changing the
panTo code to (added the setTimeout):

                window.setTimeout(function() {
                        map.panTo(new GLatLng(lat, lng));
                        }, 1000);
                map.setZoom(zoom);

I had both setCenter and panTo in the same initialization/load
function.

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