• Resolved icecreamjelly

    (@icecreamjelly)


    Hello

    When I tested this plugin, I cannot search for locations, when I type a location name eg London, only the first 2 letters get entered, and a white exclamation mark in a grey circle appears, and the field can no longer be edited, like in this screenshot: https://snipboard.io/IsOMUZ.jpg.

    Edit: I have WordPress 6.6.2 and BP xProfile Location 4.9.

    Edit 2: Found this page: https://www.philopress.com/products/bp-maps-for-members/ Not sure if my issue is related to not adding an API but I don’t have the “BP Maps” option under the wordpress settings.

    Edit 3: I have found where the option for adding an API is (settings > buddypress > in the Options tab, scroll all the way down) and added an API key, cleared the cache and the same thing happens.

    • This topic was modified 1 month, 2 weeks ago by icecreamjelly. Reason: Add detail about version number
    • This topic was modified 1 month, 2 weeks ago by icecreamjelly. Reason: Add information about API
    • This topic was modified 1 month, 2 weeks ago by icecreamjelly. Reason: Update
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author shanebp

    (@shanebp)

    >… when I type a location name eg London, only the first 2 letters get entered, and a white exclamation mark in a grey circle appears, 

    There is a problem with your Google API key; a problem not controlled by our plugin. Check your browser’s console and you will see JavaScript errors re Google and those errors will include a link to more info on Google’s support pages.

    Thread Starter icecreamjelly

    (@icecreamjelly)

    Hello Shanebp

    Thank you for pointing me in the right direction. I have solved the problem and want to post my solution here in case it is useful to anyone else.

    In this case, the issue was indeed my Google API settings. Here is how I fixed it:

    (First you need to set up an API key for your “project”. Your project is anything you are using the API for eg an app or in this case, a website.)

    1. Go to this page (you need to log in) https://developers.google.com/maps/api-security-best-practices#restricting-api-keys and follow the directions by:
    2. Right click on the provided “Google Maps Platform Credentials” link and open in a new tab so that you can use the page in step 1 as a guide. Note, the user interface/steps is slightly different to the instructions in the link in step 1.
    3. A page called “Keys and credentials” should load with your recent projects shown in boxes, like this: https://snipboard.io/geGmsF.jpg
    4. Click on your project (the website you are using the API for)
    5. The project name is displayed at the top left of the page in a drop down menu right next to the words “Google Cloud”. Make sure it is the project you want to edit, ie, the website you are setting up the plugin for. There is a checkbox listed under “API keys”. Click on the name of the API, for me it is “API key 1”, like this: https://snipboard.io/5FdYcl.jpg
    6. Now you will reach the page where it says “Key restrictions” and it should look somewhat similar to the screenshot in Step 1 above.
    7. Scroll down to where it says “API restrictions” and select “Restrict Key”. A drop down menu will appear with many options for services for you to restrict the usage of your API key to.
    8. Go to this webpage by the plugin author in a new tab: https://www.philopress.com/google-maps-api-key/ and scroll to step 4. There are 3 APIs listed, ie Maps JavaScript API, Places API, and Geocoding API. Go to the drop down menu mentioned in step 7 above and tick these API, then click save. Then the search by location feature should work.
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.