Created
February 21, 2023 13:15
-
-
Save TravelTime-Frontend/788e7bb832aa3167c43bb02e8116c233 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
// 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