Hi, I’m working with VisioWeb and I want to handle calculated route length. I found something in docs but in console I have still some errors and I can’t determine length of the route. Is there anybody who has answer to solve this kind of problem? Thanks
You can extract this information from the navigation object (if navigation was indeed enabled in the route request).
var nbInstructions = currentRoute.navigation.getNbInstructions(); var firstLength = currentRoute.navgation.getInstructionData(0).length;
You can then loop over the instructions and sum the length to get the whole route’s length.
Many thanks Cedric, that’s what I’m looking for! Do you even know how to disable “stepping” between nodes when I have computeNavigation enabled? It’s the last step what I need to deal with ;/