implement drag to change route in flex like google map

369
1
07-19-2011 08:39 AM
SiminYou
New Contributor
I have implemented routing between two stops, and user wants to drag result to change the route like in google map routing. Any suggestions?

Thanks for your reply.
Tags (2)
0 Kudos
1 Reply
SiminYou
New Contributor
I have implemented this and hope it will help others who are looking for a similar implementation.

My solution is:
1. listen to editTool's drag event
2. when a drag occurs, recording the start, end and drag points of the polyline. delete current selected polyline
3. recompute two routes, one is from start to the drag point and the other is from drag point to the end
4. merge two polylines together and display on the map

However, due to the process speed of RouteTask, it takes a while to complete a drag operation.
0 Kudos