Open dotysan opened 1 year ago
So there appears to be a new API for this.
curl "https://maps.googleapis.com/maps/api/elevation/json?locations=45.15,-75.14&key=$GOOGLE_API_KEY"
{
"error_message" : "This API key is not authorized to use this service or API.",
"results" : [],
"status" : "REQUEST_DENIED"
}
And after enabling the Maps Elevation API and adding it to my key:
curl "https://maps.googleapis.com/maps/api/elevation/json?locations=45.15,-75.14&key=$GOOGLE_API_KEY"
{
"results" :
[
{
"elevation" : 70.44151306152344,
"location" :
{
"lat" : 45.15,
"lng" : -75.14
},
"resolution" : 38.17580795288086
}
],
"status" : "OK"
}
Further poking around reveals that method='elevation'
isn't passing the API key onto the params dict.
Duplicate of #376. I guess this project is dead.
Using the example straight out of the documentation.
$
geocode '45.15, -75.14' --provider google --method elevation
null