Hi All
Rephrasing of a previous question.
An API key is required to "enable" the Elevation API in Google maps.
1. The developers guide leads the user through generating the key and gives examples of using it by appending it to the URL.
E.G.
This does not work if you try to append to the URL string in B4A code.
This code works, but not if you append the key to the end of the URL string
2. The developers guide also says not to use the key in the source code.
Now that I have generated this API key what do I do with it? Where is it used? How is it used?
Any help much appreciated.
Regards Roger
Rephrasing of a previous question.
An API key is required to "enable" the Elevation API in Google maps.
1. The developers guide leads the user through generating the key and gives examples of using it by appending it to the URL.
E.G.
B4X:
https://maps.googleapis.com/maps/api/elevation/json?locations=39.7391536,-104.9847034|36.455556,-116.866667&key=YOUR_API_KEY
This code works, but not if you append the key to the end of the URL string
B4X:
Sub getElevationData '(URL As String, taskID As Int)
HttpClient1.Initialize("HttpClient1")
Private HttpRequest1 As HttpRequest
URL1= "http://maps.googleapis.com/maps/api/elevation/json?locations="&ALat&","&ALng&"%7C"&BLat&","&BLng
HttpRequest1.InitializeGet(URL1)
HttpClient1.Execute(HttpRequest1,1)
End Sub
2. The developers guide also says not to use the key in the source code.
Now that I have generated this API key what do I do with it? Where is it used? How is it used?
Any help much appreciated.
Regards Roger