Hello everyone,
I'm trying to get the first route from a DirectionRequest. (See the code
below)
The .getDirectionsRoute() call from an instance of MapTrajet remains empty
after a .calcRoute ()
Any idea?
Thank you
My custom "class":
function MapTrajet(div, adresseDestination) {
.....
var directionsRoute = {};
this.getDirectionsRoute = function () {
return directionsRoute;
}
.....
this.calcRoute = function(latlngDepart, latlngVia1, latlngVia2) {
var request;
....
directionsService.route(request, function(response, status ) {
if (status == google.maps.DirectionsStatus.OK) {
directionsRenderer.setDirections(response);
directionsRoute = response.routes[0];
}
});
}
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.