Title: Google Maps API error
Last modified: May 24, 2017

---

# Google Maps API error

 *  Resolved [titk](https://wordpress.org/support/users/titk/)
 * (@titk)
 * [9 years ago](https://wordpress.org/support/topic/google-maps-api-error-5/)
 * Hello,
 * I am setting up a website for a customer, and this plugin seems to provide what
   I need.
 * I followed up documentation to set up google API Keys for the plugin. However,
   when I insert the plugin to a page, the map first show, and then are quickly 
   replaced with the following message:
 * > Oops! Something went wrong. This page didn’t load Google Maps correctly. See
   > the JavaScript console for technical details.
 * This happens also in the settings tab.
 * When I look at the console, this is showing:
 * > Google Maps API error: MissingKeyMapError [https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error](https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error)
 * > Google Maps API warning: NoApiKeys [https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys](https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys)
 * This looks like there is no API key, but they are there. I checked on google 
   maps API and all required services are active. Also, I checked that the code 
   for the plugin was correctly inserted in the page.
 * I tried to deactivate all the other plugins on the site, without success.
 * I might have missed something, but can’t figure out what it is.
 * I would be very grateful if you have some suggestion on what the problem could
   be.
 * Regards,
 * Lionel

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [titk](https://wordpress.org/support/users/titk/)
 * (@titk)
 * [9 years ago](https://wordpress.org/support/topic/google-maps-api-error-5/#post-9164978)
 * Some precisions, after searching a little more.
 * The include for google maps script on the page looks like this:
 * > <script type=’text/javascript’ src=’[https://maps.google.com/maps/api/js’></script&gt](https://maps.google.com/maps/api/js’></script&gt);
 * API key should be there but doesn’t get included for some reason.
 * I checked the database, both keys are there, in wp_options table, wpsl_settings
   option.
 *  Thread Starter [titk](https://wordpress.org/support/users/titk/)
 * (@titk)
 * [9 years ago](https://wordpress.org/support/topic/google-maps-api-error-5/#post-9165082)
 * I found the problem after several hours of search, so I share it, maybe it could
   help someone.
 * I found this on my theme functions.php:
 * > function billio_remove_script_version( $src ){
   >  $parts = @explode( ‘?’, $src );
   >  if (substr_count($parts[0],’googleapis.com’)
   > >0 { return $src; } else { return $parts[0]; } }
 * This means they were removing all parameters from scripts…
 * I changed it to the following:
 * > function billio_remove_script_version( $src ){
   >  $parts = @explode( ‘?’, $src );
   >  if (substr_count($parts[0],’googleapis.com’)
   > >0 || substr_count($parts[0],’maps.google.com’)>0) { return $src; } else { 
   > return $parts[0]; } }
 * Everything seems to work now.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Google Maps API error’ is closed to new replies.

 * ![](https://ps.w.org/wp-store-locator/assets/icon-256x256.jpg?rev=1007784)
 * [WP Store Locator](https://wordpress.org/plugins/wp-store-locator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-store-locator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-store-locator/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-store-locator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-store-locator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-store-locator/reviews/)

## Tags

 * [maps API](https://wordpress.org/support/topic-tag/maps-api/)

 * 2 replies
 * 1 participant
 * Last reply from: [titk](https://wordpress.org/support/users/titk/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/google-maps-api-error-5/#post-9165082)
 * Status: resolved