3

I've just noticed that the Google Maps for ExpressionEngine fieldtype no longer seems to be plotting markers onto the map for new entries in the control panel. When I enter a location and search, nothing happens. It should plot a marker on the map. I have a few sites that use this add-on, and the same issue is happening on each of them.

Any ideas what's going wrong with this? I know the add-on is no longer supported, but if anyone has run into the same issue and knows a fix, please let me know. I suspect it might be a Google API change or even a call-back to the Objective HTML servers/services that is suddenly causing this issue.

I'm using ExpressionEngine 2.7.2 and Google Maps for EE 3.3.8.

6

There seems to have been a recent change in the gmap API. See if this thread can shed some light on your issue.

Apparently changing

$this->EE->theme_loader->javascript('https://maps.google.com/maps/api/js?sensor=true');

to

$this->EE->theme_loader->javascript('https://maps.google.com/maps/api/js?v=3.22&sensor=true');

in gmap/ft.gmap.php might help.

| improve this answer | |
  • Good stuff lads worked for me too , I will have to think about migrating from google maps for ee now that it is unsupported – bhackett Dec 21 '15 at 15:00
  • Thanks, that fixed it for me as well. The FT wasn't displaying the "show details" link for route until I applied this fix. Nice one! – Anthony Mellor Jan 12 '16 at 17:05
  • Thanks Ingmar - this solved a problem we had just discovered the day before a site was meant to launch... Cheers – Jules Matthews Mar 1 '16 at 6:05
  • That fixed it for me as well. – hfrancke Mar 3 '16 at 20:02
  • Did any of you have trouble importing via Google Maps for EE import utility? That appears to be broken as well. The import utility runs fine as long as there is NOT any address information. Once it has to GEO code an address, the import just counts time but nothing happens. An entry is not made, the log is not updated. So I assume it has trouble connecting the Google API. I found lines of code within gmap_config.php that talks about using Objective HTMLs proxy. Starting line 73. Perhaps even the API keys are no longer valid? But I can't see how to set those. – hfrancke Mar 3 '16 at 20:02
1

I ran into the same issue multiple times. Most recently yesterday. Creating an API key and including it in the code solved my issue.

After you create a key and set your credentials (make sure you add your domain) edit ft.gmap (expressionengine > third_party > gmap > ft.gmap.php) and change the following line:

$this->EE->theme_loader->javascript('https://maps.google.com/maps/api/js?v=3.22&sensor=true'); 

to

$this->EE->theme_loader->javascript('https://maps.googleapis.com/maps/api/js?key=YOUR_KEY_GOES_HERE&sensor=true');

If you need help with a key see these Google directions.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.