Store Locator Plus® for WordPress Forums Store Locator Plus Another map search not working

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #58073
    barry3
    Participant

    Hi. We’re enjoying the plugin but our map search stopped working recently, similarly to other forum posts. Our page is here: https://curtisuniversal.com/find-a-distributor/.

    It works if I scroll the map and click Find Locations, but typing anything into the search bar produces this error: “Could not locate this address. Please try a different location.”

    I don’t see any errors in the javascript console.

    I’ve enabled the Maps Javascript API and Geocoding API, with HTTP referrers as the only application restrictions:

    https://*.curtisuniversal.com/*
    http://*.curtisuniversal.com/*
    https://curtisuniversal.com/find-a-distributor/
    https://curtisuniversal.com/*

    I tried pasting the API key into General -> Server -> Google Geocoding Key and Google Browser Key, but now have it only in the Google Browser Key, as I read elsewhere on the forum that it shouldn’t be entered twice.

    We’re using a custom theme built on Twenty Twelve.  Wordpress is still at 4.9.8, and PHP at 7.0.

    Any suggestions? Thanks!

    • This topic was modified 5 years, 4 months ago by barry3.
    #58076
    Lance Cleveland
    Keymaster

    If you only have a single Google API key:

     

    1) It MUST go in the browser key field.

    2) I CANNOT HAVE ANY restrictions.

    By adding an HTTP Referrer restriction you’ve now prevented your web server from talking to Google which will break ALL GEOCODING.

    With Store Locator Plus® 5 all geocoding, including the find address on the map, now goes through your web server.

    Turn off all restrictions with your Google API Key.

    #58077
    barry3
    Participant

    Hi Lance,

    Thanks for the quick and helpful reply. I removed restrictions and everything’s working as it should.

    I’m still a little confused because the documentation (https://docs.storelocatorplus.com/blog/google-server-key/) seems to say that one can add an HTTP referrer, as long as one also obtains a unique Geocoding Key. I thought I did that and tried using it, but it didn’t help.

    Also, now that I’ve removed restrictions, Google is giving this warning: “This API key is unrestricted. To prevent unauthorized use and quota theft, restrict your key to limit how it can be used.”

    Is there a way to protect the API key and still have the search function work properly?

    —Barry

    #58080
    Lance Cleveland
    Keymaster
    #58081
    barry3
    Participant

    Excellent. That’s just the info I needed. I appreciate all your help today. All is working as it should be!

    #58083
    Lance Cleveland
    Keymaster

    Glad it is working, Barry.

    If you haven’t left us a plugin review and have a minute to do so it would be much appreciated.

    Some people haven’t been able to figure this out and have been slamming our plugin on the review site.   We need all the positive reviews we can get:
    https://wordpress.org/plugins/store-locator-le/#reviews

    #58096
    barry3
    Participant

    I just left you a very positive plugin review. Thanks again for all your help!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Another map search not working’ is closed to new replies.