Answer the question
In order to leave comments, you need to log in
How to fix Google Maps API error: MissingKeyMapError?
On the site, on some pages there is a JS warning Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/j... and an error Google Maps API error: MissingKeyMapError https://developers.google.com /maps/documentation/j... . Google Maps API has a permission, but maps don't work properly... How can I fix this error?
With the API key, everything seems to be OK:
Answer the question
In order to leave comments, you need to log in
The error was due to a conflict with the ACF plugin. Here is the code that solves the problem:
function my_acf_google_map_api( $api ){
$api['key'] = 'YOUR_API_KEY';
return $api;
}
add_filter('acf/fields/google_map/api', 'my_acf_google_map_api');
Hello!
Check other plugins, maybe one of them requires you to install an API key. Also update the theme, there may be a problem in the theme. In theory, if you have entered the api key, then the map should work. Well, try to remove the restrictions in the permissions and check again.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question