Skip to content
This repository has been archived by the owner on Jul 21, 2019. It is now read-only.

Improve method for refreshing travel time #6

Open
adamsiembida opened this issue Aug 20, 2017 · 0 comments
Open

Improve method for refreshing travel time #6

adamsiembida opened this issue Aug 20, 2017 · 0 comments

Comments

@adamsiembida
Copy link
Owner

I was having a hard time finding a way to request an updated travel time estimate for the selected route in the Bing Maps documentation.

I thought I could just call the 'calculateDirections' function on the 'DirectionsManager' instance, but it would complain that it doesn't have any waypoints. I think this has something to do with the fact that the waypoints weren't added manually, but we're added using the directions input panel.

My next thought was to simply remove the waypoints added by the input panel, and then add them back manually, but that had an issue where the 'removeWaypoint' function wasn't working.

I ended up having to basically reinitiate the entire 'DirectionsManager' instance. There has to be a better way of doing this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant