Google Maps API warning: NoApiKeys

Permalink
does anybody got the same error in the inspector, when adding google maps?

difference
 
mesuva replied on at Permalink Reply
mesuva
I believe this is pretty 'normal', in that it's simply Google's API flagging that no API key is configured with the call to fetch the Google Maps scripts.

Google basically wants everyone to use a key, but still allows keyless usage of their maps.

The API limits without a key are pretty high, so it's really only on very high traffic sites that you need to be concerned.
difference replied on at Permalink Reply
difference
okay, but i never had that error before... and i use this block in nearly any page i build with c5

can you tell me, how to set the needed key in c5?
mesuva replied on at Permalink Reply
mesuva
It's something coming from Google's scripts, not concrete5's. You're most likely seeing it now because Google have introduced it.

Keep in mind it is a _warning_, not an error. It shouldn't break anything.

To set a key you'll need to override the block's controller.php file, and change the line that includes the maps.googleapis.com script to include the key.

Ultimately I think this should be something that can be done via a config value, rather than requiring hardcoding - a small item to add to possible todo list of ways this built in block could be enhanced in the future!
AmyIness replied on at Permalink Reply
Hello there,
The post may be a little bit outdated, but the information might be helpful for other users struggling with NoApiKeys error. If you have occurred a problem like a difference, then you need to sign up on Google platform and generate your own API key. When you are going to do it, the next thing you will have to do is choose the proper project (Google Maps JavaScript API) and then copy your API key correctly to the code. If you are looking for some more information about how to do it, then you can check it athttps://nearplace.com/blog/the-most-popular-google-maps-problems/#7_...