Maps are broken due to change of code/key workflow in Google APIs

×

Status message

You are not a member of this team. If you want to be part of this team, click on 'Subscribe to this team'.
Type: 
Website bug
Status: 
Resolved
Priority: 
Normal
Description: 

For the past weeks we had an issue where our Google maps were broken. This was due to Google changing API requirements. This was resolved by (1) generating an API key from Google, (2) installing the key under the Gmaps module and (3) changing the following code:

==> # diff -u3 /var/www/lbd/profiles/labdoo/modules/contrib/ip_geoloc/ip_geoloc_api.inc /tmp/ip_geoloc_api.inc
--- /var/www/lbd/profiles/labdoo/modules/contrib/ip_geoloc/ip_geoloc_api.inc 2018-10-19 10:07:43.605395624 +0000
+++ /tmp/ip_geoloc_api.inc 2018-10-19 10:07:28.281694485 +0000
@@ -10,7 +10,7 @@
// Note: secure http was chosen, as plain http may cause warnings popping up in
// environments using certificates. Alternatively headless may work?
// Size 5k.
-define('IP_GEOLOC_GOOGLE_MAPS', 'https://maps.googleapis.com/maps/api/js?key=AIzaSyBagzMTRdYiCbV81PpG-FmmPePapQu2p3I');
+define('IP_GEOLOC_GOOGLE_MAPS', 'https://maps.googleapis.com/maps/api/js');
define('IP_GEOLOC_GOOGLE_MAPS_SERVER', 'https://maps.googleapis.com/maps/api/geocode/json');