streetlogics / php-google-map-api

Automatically exported from code.google.com/p/php-google-map-api
19 stars 27 forks source link

The geoGetCoors method does not use the Google API-key in requests #107

Open fl0pp opened 6 years ago

fl0pp commented 6 years ago

It seems like this project is dead, but I use it in an old project that is still running. I found a bug in the API-call to Google in the geoGetCoords method. It does not use the API-key provided by Google in it's API-calls.

I edited line 2648 to the following:

$_url = sprintf('https://%s/maps/api/geocode/json?sensor=%s&address=%s&key=%s', $this->lookup_server['GOOGLE'], $this->mobile==true?"true":"false", rawurlencode($address), $this->api_key);