Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter tonyM3

    (@tonym3)

    It looks like this plugin is not being supported any more so here is a quick fix for anyone needing to know how to allocate a Google API key.

    First get a key (best of luck – it’s not the finest piece of work from Google!)

    Then go to editor for the pugin and find file
    responsive-google-maps/js/responsiveMap.js

    Scan down the text to find a code section that looks like:

    =========================================

    function responsive_map_load_google() {

    if (typeof google === ‘undefined’) {

    var script = document.createElement(‘script’);
    script.type = ‘text/javascript’;
    script.src = ‘https://maps.googleapis.com/maps/api/js?v=3.exp&key=put your key in here’ +
    ‘&signed_in=false&callback=responsive_map_initialize’;
    document.body.appendChild(script);

    } else {

    responsive_map_initialize();

    }
    }

    ===============================================

    Then replace “put your key in here” with your key.

    Note that if the plugin is ever updated this file will be overwritten so you will have to put the key back in.

    Note: don’t forget to include the added bit of code “&key=” on this line.

    Best of luck

    T

    If anyone is technically competent enough to answer my post on displaying a responsive map in a bootstrap modal – I could do with some help as I don’t do coding and things need to be spelled out carefully!

    I think all that is needed is a resize trigger on load but I don’t know what to put where!

    Plugin Author Ilja Zaglov

    (@zaglov)

    Hi Tony,

    thank you for the report and the fix. We will try to implement a clean solution for everyone tomorrow or at least the day after. Sorry for the inconvenience.

    Ilja

    Thread Starter tonyM3

    (@tonym3)

    OK no problem – you have a great plugin that is so simple to use and delivers the responsive maps that seem to work better than most of the others.

    I have no idea what’s involved but if you can make the maps display in a modal (just needs a resize activating on load I think) you would be way ahead of the competition. See my other post.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Google maps api key now needed’ is closed to new replies.