Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TravelTime-Frontend/788e7bb832aa3167c43bb02e8116c233 to your computer and use it in GitHub Desktop.
Save TravelTime-Frontend/788e7bb832aa3167c43bb02e8116c233 to your computer and use it in GitHub Desktop.
// The request for the geocoder. Reference: http://docs.traveltimeplatform.com/reference/geocoding-search/
var request = {
query: location
};
$.ajax({
// The URL for the geocoding endpoint.
url: "http://api.traveltimeapp.com/v4/geocoding/search",
// We need to send a GET request to it.
type: "get",
// The authentification headers.
"headers": headers,
data: request,
contentType: "application/json; charset=UTF-8",
// We handle the response here
success: function (data) {
// Here we handle the response with the coordinates for the location.
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment