Can I use Animation and Circle modules with a Promise ?

Jan 28, 2015 at 8:43 AM
Edited Jan 29, 2015 at 11:30 AM

Thank you for all the work you provide here, it is really helpful.
I plan to use your Animation and Circle modules in this way:

I have a pin (the boat) located somewhere on an ocean.
When the user clicks on the sea, I want to set a new pin but that pin should be a light blue circle that grows and shrinks to highlight the destination of the boat.

Could you tell me if your circle module can be used for that ?
Meaning there would be a repetitive animation to grow and shrink the radius of the circle.

Then, I will use Animation to make the boat moves from previous location to the location with the circle but when the animation is over, I would like the circle to disappear, center the map and then calculate a new position on the same direction to make the boat continue forward and this is where I was thinking that a promise could be used.

I have started to change it to use a JQuery Deffered object inside the Animation.Start method and it works but I am not sure it is the best way to do that.

In each animation frame, I will check if the new position still has enough water for the boat to move on and stop the animation if not. When using the REST service, I always get '0' for the elevation while in the ocean, would you know if this is a limitation of the service or would it be a bad usage of it in my code ?

Thank you for any advice, best regards,