Support » Plugin: WP Google Maps » Map doesn’t show on an SSL enabled site

  • Resolved MJ WebWorx



    i just found out that the map isnt shown on my websites with ssl connection.
    I get the following two errors in the Javascript console:

    [Error] ReferenceError: Can’t find variable: google
    global code (wpgmaps.min.js:1:10299)

    ReferenceError: Can’t find variable: google
    InitMap — wpgmaps.min.js:1
    (anonyme Funktion) — wpgmaps.min.js:1:4592
    c — jquery-1.9.1.min.js:3:7979
    fireWith — jquery-1.9.1.min.js:3:8776
    ready — jquery-1.9.1.min.js:3:3394
    H — jquery-1.9.1.min.js:3:817

    Please could you look into this?


    The map should be shown down below the contact form..

    Thanks a lot for your help!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Was introduced in one of the latest updates.

    If you look at the code of wp-google-maps/wpGoogleMaps.php it has a hardcoded call to http – which is being blocked as not-secure by your browser.

    function wpgmaps_load_maps_api() {
    wp_enqueue_script(‘google-maps’ , ‘’ , false , ‘3’);

    As a temporary measure, change


    [removing the ” http: ” ]
    as that will make the call relative to the protocol used.


    in addition there is a second hardcoded call to http in the same file at

    if( $wpgmza_api_key ){
    wp_enqueue_script(‘wpgmza_api_call’, ‘’.$wpgmza_suffix.’/maps/api/js?’.$api_version_string.’key=’.$wpgmza_api_key.’&language=’.$wpgmza_locale, array(), null );
    } else {
    wp_enqueue_script(‘wpgmza_api_call’, ‘//’.$wpgmza_suffix.’/maps/api/js?’.$api_version_string.’language=’.$wpgmza_locale, array(), null );

    again, please change

    und you’re ready to go 🙂

    • This reply was modified 3 years, 1 month ago by tombob2006. Reason: add tags

    hi tombob,

    thanks for your help!
    do you know since which version this error occured?
    i’m thinking about downngrading instead of altering the code.

    are the plugin developers aware of this error?

    I just downgraded to version 6.3.17.
    It worked and the map is shown again.

    @ the plugin developer:

    when are you planning to release an update,
    where SSL works again?



    @tombob2006 – Thank you very much for posting the above solution.

    @jansesberger – We’re going to be releasing an updating in less than 24 hours (We’re still testing to ensure this is a final fix) that will resolve the above issue. I sincerely apologize for this.

    thanks for your fast reply!
    i’m looking forward to the update 🙂



    Only a pleasure. Thanks so much for your patience and understanding.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Map doesn’t show on an SSL enabled site’ is closed to new replies.