I am trying to use longitude latitude as a waypoint on my google maps and cannot make it work.
Here how my values ββare popped
waypts_mtlsheloc.push({ location: (45.658197,-73.636333),
And then try changing my line as follows
service.route({ origin: latlng_mtlsheloc[0], destination: latlng_mtlsheloc[latlng_mtlsheloc.length - 1], waypoints:waypts_mtlsheloc, travelMode: google.maps.DirectionsTravelMode.DRIVING }, function(result, status) { console.log(status) if (status == google.maps.DirectionsStatus.OK) { path = path.concat(result.routes[0].overview_path); line_mtlsheloc.setPath(result.routes[0].overview_path); } });
But this gives me the error "Error in the [waypoint] properties", I tried different ways to record the location, but I can not find the right one.
source share