My goal is to move a pointer from one geo location to another based on the GPS location received from the device. however, i managed to do this by clearing the layer and re drawing the point on the map. but in a graphical prospective I need to move the pointer in a smooth way rather than clearing out the point and readding it to the maps. this application is related to fleet.
It would be great if someone could point me on the right direction on this.
You can use the mapview.goTo() method to animate from one location to another - supplying the new GPS location as the target.
mapview.goTo() this method is used to navigate from 1 point to another. that's not what I am looking for. actually im looking for something like this.
I need the point to be moved from 1 location to another without clearing the mapview and readding the point. I need to move the point by animating it
basically a fleet moving on the street. that's the whole goal
Thanks for clarifying - unfortunately I dont think there's any way to animate something in the framework without clearing and readding it - as effectively you need to redraw the frame for it to animate.
The smoothness comes into how often you update the frame and how far you're moving the point.
If you simply animating from one co-ordinate from another you can just calculate the steps inbetween the two endpoints and then remove and add a point to the new step.
If it's along a route you'll need to calculate the route and likely densify the results so you have more steps to animate through.
This is rough example based on the sample code, after you click two points on the map it draws a new symbol and clears and adds the point along the path effectively animating it.
To get even more smooth results you'd probably increase the density and decrease the time between updates.