Maps stopped working on site

This topic contains 16 replies, has 4 voices, and was last updated by  Stiofan O’Connor 6 years ago.

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

Open Support Ticket
  • Author
    Posts
  • #458167

    vpmcorp
    Full Member
    Post count: 46

    Suddenly getting the error “This page can’t load Google maps correctly”, it has worked fine up until now. I can still view the map for the default location in admin area but not on the site? What changed and how do I get these back? I created a new api key at Google and have the same problem,, naps only appear in admin.

    #458170

    Alex Rollin
    Moderator
    Post count: 27815

    Try generating a new key, and make sure your API project has billing connected:

    https://wpgeodirectory.com/docs-v2/integrations/google/#easy

    #458173

    vpmcorp
    Full Member
    Post count: 46

    As I already said I did try a new key, and the billing is active. The maps appear in ADMIN, but not on public pages.

    Do they have to be enqueued now in functions.php? This is odd it would just suddenly stop working.

    #458198

    Kor
    Moderator
    Post count: 16516

    Hi there,

    Thanks for your reply. Could you possibly share your WP admin access here in private reply so that we could check on it?

    #458204

    vpmcorp
    Full Member
    Post count: 46
    This reply has been marked as private.
    #458213

    Alex Rollin
    Moderator
    Post count: 27815

    You can try clearing cache, the key can get stuck in cache for not logged in users.

    New keys can take time to be activated.

    Did you use our “Generate Key” button? You key could be missing necessary APIs.

    Try checking the console to see what error it is throwing on the front end.

    #458216

    vpmcorp
    Full Member
    Post count: 46

    I tried both ways to get a new api key, through the admin link and at Google console. I just tried again with your admin link and get “Failed to load” when licking on “continue” my existing project at https://console.developers.google.com/

    I hit refresh and google loads, and I select create yet another key, static maps api

    What is wrong with this, as I said it worked fine for months. This shouldn’t have just stopped.

    #458217

    vpmcorp
    Full Member
    Post count: 46
    This reply has been marked as private.
    #458225

    vpmcorp
    Full Member
    Post count: 46
    This reply has been marked as private.
    #458231

    Alex Rollin
    Moderator
    Post count: 27815

    If it says “exceeded quote” then it will not work. You will have to set the quotas higher, which is usually done when a billing account is added.

    We can take a look, just write back with a private reply including your site login URL and WP Admin credentials so someone on the team can take a look at the settings.

    #458234

    vpmcorp
    Full Member
    Post count: 46
    This reply has been marked as private.
    #458237

    Alex Rollin
    Moderator
    Post count: 27815

    Google changed their policy and requires billing accounts now. Without billing quotas are set to “1” map view, which is easily exceeded.

    https://wpgeodirectory.com/google-maps-platform-changes-directory-developers/
    https://cloud.google.com/maps-platform/user-guide/

    #458239

    vpmcorp
    Full Member
    Post count: 46
    This reply has been marked as private.
    #458242

    Alex Rollin
    Moderator
    Post count: 27815

    The quota is set on the key, not in GD.

    #458245

    vpmcorp
    Full Member
    Post count: 46

    Again, the quota is not the issue, obviously. I found one plugin conflict. Here are the console errors, how do we fix these now:

    js?key=AIzaSyAMzqVC1FYDIwPNgbbU3sooKU1jq9j-jmY:121 You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors.
    sh @ js?key=AIzaSyAMzqVC1FYDIwPNgbbU3sooKU1jq9j-jmY:121
    Ah @ js?key=AIzaSyAMzqVC1FYDIwPNgbbU3sooKU1jq9j-jmY:119
    google.maps.Load @ js?key=AIzaSyAMzqVC1FYDIwPNgbbU3sooKU1jq9j-jmY:18
    (anonymous) @ js?key=AIzaSyAMzqVC1FYDIwPNgbbU3sooKU1jq9j-jmY:202
    (anonymous) @ js?key=AIzaSyAMzqVC1FYDIwPNgbbU3sooKU1jq9j-jmY:202
    on_document_load.min.js:1 Google Maps API Loaded 🙂
    js?&language=en&key=AIzaSyAMzqVC1FYDIwPNgbbU3sooKU1jq9j-jmY:51 InvalidValueError: setMap: not an instance of Map; and not an instance of StreetViewPanorama
    _.Ic @ js?&language=en&key=AIzaSyAMzqVC1FYDIwPNgbbU3sooKU1jq9j-jmY:51
    _.Lc @ js?&language=en&key=AIzaSyAMzqVC1FYDIwPNgbbU3sooKU1jq9j-jmY:51
    (anonymous) @ js?&language=en&key=AIzaSyAMzqVC1FYDIwPNgbbU3sooKU1jq9j-jmY:64
    MyOverlay @ goMap.min.js:1
    init @ goMap.min.js:1
    (anonymous) @ goMap.min.js:1
    each @ jquery.js:2
    each @ jquery.js:2
    $.fn.goMap @ goMap.min.js:1
    initMap @ map.min.js:1
    parse_marker_jason @ map.min.js:1
    success @ map.min.js:1
    i @ jquery.js:2
    fireWith @ jquery.js:2
    y @ jquery.js:4
    c @ jquery.js:4
    XMLHttpRequest.send (async)
    send @ jquery.js:4
    ajax @ jquery.js:4
    map_ajax_search @ map.min.js:1
    build_map_ajax_search_param @ map.min.js:1
    (anonymous) @ (index):719
    i @ jquery.js:2
    fireWith @ jquery.js:2
    ready @ jquery.js:2
    K @ jquery.js:2
    js?key=AIzaSyAMzqVC1FYDIwPNgbbU3sooKU1jq9j-jmY:51 Google Maps JavaScript API error: RefererNotAllowedMapError
    https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error

Viewing 15 posts - 1 through 15 (of 17 total)

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

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount