yii2-google-maps-library icon indicating copy to clipboard operation
yii2-google-maps-library copied to clipboard

Error of GeocodingClient on production server

Open icekem opened this issue 6 years ago • 1 comments

Trying to get coordinates (lat, lon) by GeocodingClient.

It works on local host, but on production i have error response

stdClass Object ( [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] => Array ( ) [status] => OVER_QUERY_LIMIT )

My controller code

            $geocliente = new GeocodingClient();
            $aGeoCodeRes = $geocliente->lookup(
                [
                    'address' => $aQuery['q'],
                ]
            );

I have keys on config files Also a have Google Cloud Platform keys for Geocoding API and Maps JavaScript API. Tried to make restrictions by domain (host)

So works on local host, doesn't work on production.

Any ideas?

icekem avatar Dec 15 '18 14:12 icekem

@icekem it could be an issue with the keys and domains. Careful now as it will not longer return a stdObject but an array

tonydspaniard avatar Apr 15 '19 17:04 tonydspaniard