the above panTo does not work for panning great distances(ie: new York
to Hong Kong)  so the workaround is this:



myTimer = new Timer(100);
myTimer.addEventListener("timer", zoomBack);
myTimer.start();

public static function zoomBack(eventArgs:TimerEvent):void
{
  var val1 = String(_map.getCenter());
  var val2 = String(lastPoint);
  lastPoint = _map.getCenter();
  if(val1==val2)
  {
    myTimer.stop();
    myTimer.removeEventListener("timer", zoomBack);
    _map.addEventListener(MapZoomEvent.ZOOM_CHANGED, zoomedIn);
    _map.setZoom(zoomLevel,true);
  }
}
public static function zoomedIn(event:MapZoomEvent=null):void
{
  _map.removeEventListener(MapZoomEvent.ZOOM_CHANGED, zoomedIn);
  //do action after pan is complete
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API For Flash" 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-for-flash?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to