Closed CyberAP closed 6 years ago
I am not trying to cancel the timeout, but instead I want to destroy an instance of that timeout after it's been executed. I can add $timeout.cancel();
but that wouldn't mean that I won't need to set my timeout to undefined afterwards. There is a way to check if a timeout has ended by checking $$state
property, but that's considered a bad practice, so I thought the best workaround would be to simply set it to undefined. If you could help me find a better way of checking for a completed timeout I would be glad to improve this part of code.
Also I don't really know if I should update builds or include them in the pull request. They occasionally got into it, but I need to know if I should add them in the next commit.
As stated in some issues, directions can break if you subsequently update more than 1 attribute there. For example if you change
destination
andwaypoints
it will break at some point. This is caused by miltiplesetDirections()
calls. I resolved it by creating a request stack with a 20ms window. That should be enough to handle simple routes with Google's limit of 10 joints.Reports: