0

I'm updating an EE site from 2.3.x to 2.10.3 and as part of that I'm upgrading mx_google_map from 1.4 to 1.5.3.

Using the field type on the front end I get the following console error:

Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys

I have this in

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="/themes/third_party/mx_google_map/mxgooglemap.js"></script>

On the live site the api key is included but in the updated site it doesn't appear to work.

The test site I'm using is on a sub-domain and I wonder if that's the cause of the problem or is it down to the extension.

Should I specify the API key somewhere, am I missing something obvious?

Thanks.

2

Try adding the key as a GET parameter to the API source script tag:

https://maps.googleapis.com/maps/api/js?key=YOUR_KEY_GOES_HERE&sensor=true

I've seen this issue in some places, as well as right here! :

Google Maps for EE stopped plotting markers for new entries in the control panel

| improve this answer | |
  • Excellent thanks. I even thought about doing that. Doh! – Adam Rifat Jun 16 '16 at 14:05

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.