Google Maps not loading; console API error

This topic contains 12 replies, has 3 voices, and was last updated by  Stiofan O’Connor 8 years, 1 month ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #145621

    CHRISTOPHER MACKAY
    Buyer
    Post count: 37

    Hi,

    Just getting started with Geodirectory.

    When adding places, the Google Map section of the page is blank, and with a street address entered along with the country and province, clicking the Set Address on Map button returns

    Sorry, no record were found. Please adjust your search criteria and try again.

    This despite the same info placed directly into maps.google.com returns an accurate result.

    The console in Google Chrome shows the following:

    
    
    Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
    util.js:219
    #145636

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    the warning isn’t the problem.

    Please provide a link and admin credentials in a private reply and we will have a look at your settings.

    Thanks

    #145638

    CHRISTOPHER MACKAY
    Buyer
    Post count: 37
    This reply has been marked as private.
    #145642

    Paolo
    Site Admin
    Post count: 31206

    It seems to be the security plugin removing all version and query string from css and js files.
    In this case it remvoes the setting to get the places from google api.

    Is there a setting to disable it from doing so? If not, you’ll need to disable the entire plugin and look for something more flexible.

    Let us know,

    Thanks

    #152828

    CHRISTOPHER MACKAY
    Buyer
    Post count: 37

    I tried disabling any related settings, but nothing changed.

    I then chose the nuclear option — this is just a staging site, after all — and deactivated all non-WPGeodirectory plug-ins.

    Still no Google Maps.

    The WordPress > Plug-ins > Geodirectory > MultiLocations > Add/Edit Location tab shows a Google Map centred on the default region for the locations I’ve entered. So my browser is clearly capable of displaying Google Maps.

    Now what?

    #153641

    CHRISTOPHER MACKAY
    Buyer
    Post count: 37

    Tap, tap, tap. Anybody home?

    #153642

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    I’m sorry for the late repy, we had troubles with the server yesterday and missed many notifications. We are working hard now to recover.

    I see your map loading fine now (see image attached). I guess you just need to clear your browser cache.

    Let us know,

    Thanks

    #153674

    CHRISTOPHER MACKAY
    Buyer
    Post count: 37

    Thanks for the follow-up.

    That’s nice that you see that, but I still don’t, on the admin site the map area is blank, and on the public side, I see a loading spinner centred on central Latvia on a dimmed map of Europe.

    How do you propose I clear my browser cache? Option-clicking the page-reload button in Safari should do it (but doesn’t), and Firefox’s history shows literally nothing to clear — the button is greyed-out, even (I don’t normally use Firefox, so this isn’t surprising).

    I just loaded the public page (that you screenshot, above) on 2 iOS devices that have never been here. They show Latvia, too.

    Oh, and the dummy data that come with the plug-in all load up Latvia, too.

    #153683

    Paolo
    Site Admin
    Post count: 31206

    Ok on the single page I see that too and there is an error:

    TypeError: google.maps.places is undefined

    autocomplete = new google.maps.places.Autocomplete(

    I’ve asked to the developers to further follow up.

    Thanks for your patience,

    #153685

    CHRISTOPHER MACKAY
    Buyer
    Post count: 37

    Thanks; look forward to hearing back! 🙂

    #153722

    CHRISTOPHER MACKAY
    Buyer
    Post count: 37

    If this helps, here’s a screenshot of the backend: no map loading, and an error about “no records found”. The fact that you saw a map with correct info is likely because I manually entered Lat/Long coordinate from a separate maps.google.com window.

    #153755

    CHRISTOPHER MACKAY
    Buyer
    Post count: 37

    We have the answer! There was a function in my theme’s default functions.php whose comment was:

    // to remove query strings from static resources, which Pingdom dislikes

    Commenting it out sorted everything with the Google maps.

    Sorry for the trouble.

    #154307

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Great! 🙂

Viewing 13 posts - 1 through 13 (of 13 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket