PHP Classes

How I can see waypoints order?

Recommend this page to a friend!

      Map Builder  >  All threads  >  How I can see waypoints order?  >  (Un) Subscribe thread alerts  
Subject:How I can see waypoints order?
Summary:Waypoints order google map
Messages:4
Author:Roberto Pavesi
Date:2017-03-09 12:47:42
 

  1. How I can see waypoints order?   Reply   Report abuse  
Picture of Roberto Pavesi Roberto Pavesi - 2017-03-09 12:47:42
Hi,
your library is THE NUMBER ONE !
I'm in trouble on retrieving waypoints order on optimized route.
I try to retrieve "waypoint_order" variable without success in php

Any suggestion ?

  2. Re: How I can see waypoints order?   Reply   Report abuse  
Picture of Vagharshak Tozalakyan Vagharshak Tozalakyan - 2017-03-09 19:47:24 - In reply to message 1 from Roberto Pavesi
Check the "result" value in Example 12:

directionsService.route(request, function(result, status) {
console.log(result.routes[0].waypoint_order);
});

  3. Re: How I can see waypoints order?   Reply   Report abuse  
Picture of Roberto Pavesi Roberto Pavesi - 2017-03-10 11:18:15 - In reply to message 1 from Roberto Pavesi
I have already tried a code like this:
alert(console.log(result.routes[0].waypoint_order));

result a popup with the text "empty"

  4. Re: How I can see waypoints order?   Reply   Report abuse  
Picture of Vagharshak Tozalakyan Vagharshak Tozalakyan - 2017-03-10 14:26:01 - In reply to message 3 from Roberto Pavesi
console.log() cannot be in alert()... If you want to alert then just call alert(result.routes[0].waypoint_order).