Intercepting an Event when FlyTo ends?

Jun 26, 2009 at 6:47 PM

Hi again,

I'm trying to trigger something to occur after a FlyTo animation ends - I want to scatter some pics etc.

I can see from the source code that there is something promising called onFlyToEndCallbacks but I can't figure out how to access it.

Can I use this to trigger an event (when the pin is pressed ) which will fire when the FlyTo ends?

 

Coordinator
Jun 27, 2009 at 6:15 PM

Yes, if you call FlyTo() with one of the callback variations:

 public void FlyTo(VELatLong latLong, double pitch, double yaw, EventHandler callback);
public void FlyTo(VELatLong latLong, double pitch, double yaw, double altitude, EventHandler callback)

Then when the FlyTo animation is completed, it will call your EventHandler.  Just pass it any function that matches an EventHandler signature.

You could also potentially use this to chain together multiple FlyTos, or other more complicated scenarios.

Jun 28, 2009 at 3:32 PM

Thanks Josh!