You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would love to get some input and help with adding directions_changed listener. However, I can't comprehend how to connect it all. I have added the code pasted below right after directionsDisplay is initialized, but the problem is that neither onChange or directionsDisplay are defined inside listener function. Obviously...
So my temporary workaround was to create additional EventEmitter outside of AgmDirection class, then subscribe to it in ngOnInit, and finally from there just emit onChange with directionsDisplay.getDirections(). Kind of a tacky but it works. If dragable is set to true then after dragging route will fire onChange with modified route.
Would love to know what would be the proper way to do this and perhaps it can be added to project.
The text was updated successfully, but these errors were encountered:
P1X3
changed the title
Adding
Adding directions_changed listener for dragable routes
May 5, 2018
Would love to get some input and help with adding directions_changed listener. However, I can't comprehend how to connect it all. I have added the code pasted below right after
directionsDisplay
is initialized, but the problem is that neither onChange or directionsDisplay are defined inside listener function. Obviously...So my temporary workaround was to create additional EventEmitter outside of AgmDirection class, then subscribe to it in ngOnInit, and finally from there just emit onChange with directionsDisplay.getDirections(). Kind of a tacky but it works. If dragable is set to true then after dragging route will fire onChange with modified route.
Would love to know what would be the proper way to do this and perhaps it can be added to project.
The text was updated successfully, but these errors were encountered: