Created
January 3, 2015 11:35
-
-
Save GregoryCollett/c8e3599f6170127a8159 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from and to are objects that live somewhere else (for examples sake) | |
uiGmapGoogleMapApi.then(function(maps){ | |
var directionsService = new maps.DirectionsService(); | |
var request = { | |
origin: new maps.LatLng( | |
from.lat(), | |
from.lng() | |
), | |
destination: new maps.LatLng( | |
to.lat(), | |
to.lng() | |
), | |
travelMode: maps.TravelMode['DRIVING'], | |
optimizeWaypoints: true | |
}; | |
directionsService.route(request, function(response, status) { | |
//do stuff here with response | |
}); | |
}); |
Says that from is not defined.
how to display direction root in one string?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is the ui code that you have written for this?