Title: Erreur : InvalidValueError: initMap is not a function
Last modified: September 1, 2016

---

# Erreur : InvalidValueError: initMap is not a function

 *  Resolved [Benkho](https://wordpress.org/support/users/benkho/)
 * (@benkho)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/erreur-invalidvalueerror-initmap-is-not-a-function/)
 * Hi,
 * I have this error when the map load :
    Erreur : InvalidValueError: initMap is
   not a function
 * Can you help me?
 * [https://wordpress.org/plugins/simple-google-maps-short-code/](https://wordpress.org/plugins/simple-google-maps-short-code/)

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

 *  [Luke Cavanagh](https://wordpress.org/support/users/lukecavanagh/)
 * (@lukecavanagh)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/erreur-invalidvalueerror-initmap-is-not-a-function/#post-7676165)
 * [@benkho](https://wordpress.org/support/users/benkho/)
 * What address was being used in the shortcode?
 *  Thread Starter [Benkho](https://wordpress.org/support/users/benkho/)
 * (@benkho)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/erreur-invalidvalueerror-initmap-is-not-a-function/#post-7676168)
 * [@luke](https://wordpress.org/support/users/luke/)
    Sorry, i have find the probleme.
   API key was not shortcode, there was HTML in it. Thank you for your prompt response
   🙂
 *  [Luke Cavanagh](https://wordpress.org/support/users/lukecavanagh/)
 * (@lukecavanagh)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/erreur-invalidvalueerror-initmap-is-not-a-function/#post-7676170)
 * [@benkho](https://wordpress.org/support/users/benkho/)
 * Glad you fixed the issue
 *  [yizhaq21](https://wordpress.org/support/users/yizhaq21/)
 * (@yizhaq21)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/erreur-invalidvalueerror-initmap-is-not-a-function/#post-8173580)
 * Hi, I got the same problem
    [http://locksmithfairlawn.com/](http://locksmithfairlawn.com/)
 * why is that?
    -  This reply was modified 9 years, 9 months ago by [yizhaq21](https://wordpress.org/support/users/yizhaq21/).
 *  [yizhaq21](https://wordpress.org/support/users/yizhaq21/)
 * (@yizhaq21)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/erreur-invalidvalueerror-initmap-is-not-a-function/#post-8175183)
 * need to replace this line:
 * > wp_enqueue_script( ‘google-maps-api’, ‘//maps.google.com/maps/api/js?sensor
   > =false&callback=initMap&key=’ . sanitize_text_field( $atts[‘key’] ) );
 * to this one:
 * > wp_enqueue_script( ‘google-maps-api’, ‘//maps.google.com/maps/api/js?key=’ .
   > sanitize_text_field( $atts[‘key’] ) );

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

The topic ‘Erreur : InvalidValueError: initMap is not a function’ is closed to new
replies.

 * ![](https://ps.w.org/simple-google-maps-short-code/assets/icon-256x256.png?rev
   =1868328)
 * [Simple Shortcode for Google Maps](https://wordpress.org/plugins/simple-google-maps-short-code/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-google-maps-short-code/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-google-maps-short-code/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-google-maps-short-code/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-google-maps-short-code/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-google-maps-short-code/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [yizhaq21](https://wordpress.org/support/users/yizhaq21/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/erreur-invalidvalueerror-initmap-is-not-a-function/#post-8175183)
 * Status: resolved