craft-coordinates
craft-coordinates copied to clipboard
Keyless API calls are deprecated
since two days Google Maps API refuses to return Longitude/Latitude without having an valid API key.
{
"error_message" : "Keyless access to Google Maps Platform is deprecated. Please use an API key with all your API calls to avoid service interruption. For further details please refer to http://g.co/dev/maps-no-account",
"results" : [],
"status" : "OVER_QUERY_LIMIT"
}
You need to modify this file: coordinates -> services -> CoordinatesService.php
from this:
$data = file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?address=' . urlencode($address));
to this:
$data = file_get_contents('https://maps.googleapis.com/maps/api/geocode/json?key=YOUR_KEY&address=' . urlencode($address));
two things need to be changed:
- requests must be over https
- you need to enter a API key (without any restrictions).
Hope that helps. Stefan
yes, I actually did it exactly as you described. I just thought it might be helpful for people having the same issue because the plugin doesn't make it clear, as in the README.md
it's described as a "keyless" plugin.
maybe I will create a pull request if I find the time for the edits.