Home>Support>Google Map widget is not working even with the Api key

Google Map widget is not working even with the Api key

By i2000s, 8 years ago. Last reply by Alex S, 7 years ago.

To be specific, it is not working in the Interactive map mode. But it can show a static map for no use. Any idea? I have seen this being reported a month before, and thread suggests to reopen a new thread about this issue. I am using the SiteOrigin plugin.

Thanks,
Qi

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 8 years, 2 days ago Alex S
    Hi, I Work Here

    Hi Qi,

    When this happen it’s due to having the static API libraries added but not the interactive libraries added to your API key. The easiest way to resolve this issue would be to create a new API key through this page and then change your Google Maps widget to your newly created API key.

  2. 8 years, 2 days ago i2000s

    Hi Alex,

    I have tried the new API keys with all google map libraries enabled on the dashboard, but the interactive (javascript) map still doesn’t work. I only see a blank page if I use the “interactive map” in the widget. Are you sure the OriginSite widget plugin uses the latest standard from the Google Map javascript APIs as you have linked to their page? Or, maybe I have overlooked something in setting it up. More details on setting it up are appreciated.

    Thanks,
    Qi

  3. 8 years, 2 days ago i2000s

    Here is the output from the console when I use the static map:

    JQMIGRATE: Migrate is installed, version 1.4.1
    2jsapi?autoload={“modules”%3A[{“name”%3A”visualization”%2C”version”%3A”1″%2C”language”%3A”en”%2C”pac…:22 A Parser-blocking, cross-origin script, https://www.google.com/uds/api/visualization/1.0/b5ac9efed10eef460d14e653d0…mat+en,default+en,ui+en,geochart+en,table+en,orgchart+en,corechart+en.I.js, is invoked via document.write. This may be blocked by the browser if the device has poor network connectivity.
    js-map.min.js:1 Uncaught TypeError: Cannot read property ‘libraries’ of undefined

    Here is the output from the console if I switch to use the interactive map:

    JQMIGRATE: Migrate is installed, version 1.4.1
    2jsapi:22 A Parser-blocking, cross-origin script, https://www.google.com/uds/api/visualization/1.0/b5ac9efed10eef460d14e653d0…mat+en,default+en,ui+en,geochart+en,table+en,orgchart+en,corechart+en.I.js, is invoked via document.write. This may be blocked by the browser if the device has poor network connectivity.
    js-map.min.js:1 Uncaught TypeError: Cannot read property ‘Geocoder’ of undefined

  4. 8 years, 2 days ago Alex S
    Hi, I Work Here

    Hi I2000s,

    Yes, I can assure you we’re using the latest version of the Google Maps API. If the API key generated through the linked page doesn’t work it’s quite likely there’s a plugin conflict occurring as the API key that was generated is all that’s required for the interactive map to work. The follow up post also suggests this that there may be a plugin conflict.

    Can you try disabling all non-SiteOrigin plugins and see if this fixes the issue? You’ll need to clear all your caches after disabling your plugins.

    If it does fix the issue, then try re-enabling your plugins one by one until the issue comes back. This procedure will help diagnose which plugin is causing the issue.

    Once we know that, we’ll be able to look at what might be causing the conflict and either solve the problem or help you find an alternative plugin.

    If you aren’t using a SiteOrigin theme, then you can also try temporarily switching to one of the default WordPress themes to see if the issue is theme related.

  5. 7 years, 11 months ago pjwiebe

    I am also having an error with the map, there seems to be an error in the js-map file. The console says:

    Uncaught TypeError: Cannot read property 'libraries' of undefined :: js-map.min.js?ver=1.7.1:formatted:270

    I created a new API key today and selected the Static version of the Map Widget. The only other widget I have set up is required by my theme to use the page builder plugin for the site.

  6. 7 years, 11 months ago pjwiebe

    I posted the google api link in the url and the response I got back from google was this:

    The Google Maps API server rejected your request. Invalid request. Missing the ‘size’ parameter.

  7. 7 years, 11 months ago pjwiebe

    I think I figured it out, partly at least. You need to enable the Geocoding API. That was what wasn’t working, I had the Google Maps Javascript API enabled only. Once I enabled the Geocoding API it worked.

  8. 7 years, 11 months ago pjwiebe

    It only works with the Interactive Map, not the Static. The Static map is still broken.

  9. 7 years, 11 months ago pjwiebe

    Wow, there is a specific API for everything. So I just enabled the Static Maps API and now it is working also.

    • 7 years, 11 months ago Alex S
      Hi, I Work Here

      Hi Pjwiebe,

      I’m sorry I didn’t see your replies sooner. Yeah, pretty much. The different API libraries that can be enabled is what typically tricks people up.

      For reference, you can create a specific API by navigating to either this page for a dynamic map or this page for a static map. Sadly there’s no method of creating one that has all options automatically enabled.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More