Geolocation widget not working properly

  • Profile Image
    Philip_Seaton
    Asked on September 22, 2019 at 06:10 AM

    Hi. Trying to add a location selector to our form so that the guys can select where they are travelling to and from.

     

    But we just get a java error. Please can you help?

     

    1569146982Snip20190922_6.png

  • Profile Image
    roneet
    Answered on September 22, 2019 at 07:35 AM

    There are some console logs which states that the Google API key is not properly enabled.

    When you go to your Google Dev's page to create an API Key, make sure the 3 options are selected. These are essential in order for the widgets to work properly.

    Let us know how it goes.

    Thanks.

  • Profile Image
    Philip_Seaton
    Answered on September 25, 2019 at 06:46 AM

    Hi. I clicked on the link youu shared, but couldn't find the page on your screenshot. The API is already created, how do I get to this page to tick those boxes? Please provide a simple step by step for an idiot.

  • Profile Image
    gerardw
    Answered on September 25, 2019 at 08:37 AM

    You will get these options when you enable the Google Maps platform from the link below:

    https://cloud.google.com/maps-platform/ 

    Click on "Get started", which will give you the screen below.

    15694149732509_15.png

  • Profile Image
    Philip_Seaton
    Answered on September 26, 2019 at 09:58 AM

    Hi. Thanks, I did this. Clicked all 3 boxes, added billing details etc, added the widgets and the API key and it still gives me the same error.

     

    Please help as we need to roll this out ASAP.

     

    Many thanks

  • Profile Image
    roneet
    Answered on September 26, 2019 at 10:48 AM

    Please try the following: 

    1) Go to: https://developers.google.com/maps/documentation/javascript/get-api-key

    2) Click Get Started:

    15493588022019-02-05_10-24-29.png

    3) Choose all the 3

    4) Create a new project, so don't use the existing one:

    15493588732019-02-05_10-26-22.png

    And use that new key in your form.

    5. Enable billing at the end. You can also check your billing using this link: https://console.cloud.google.com/project/_/billing/enable

    If you have already activated the billing, then that must the Places API. See below:

    https://console.cloud.google.com/apis/library/places-backend.googleapis.com?q=places

    15627965442019-07-11-015.png

    If it is not enabled, you will see the Enable button instead of Manage.

    6. Also, enable all the location-specific APIs here:

    https://console.cloud.google.com/google/maps-apis/overview

    15640194621.PNG

    7. Under “Key Restrictions” make sure it’s set to “None”

    4. Click on the “API Restrictions” tab and make sure none of the map features are selected from the drop-down menu.

    5. Save the settings.

    Hope this helps!

    Thanks.

  • Profile Image
    roneet
    Answered on September 26, 2019 at 10:50 AM

    Also, please check this link on the generation of Google API Click this link to see the video.

  • Profile Image
    Philip_Seaton
    Answered on September 27, 2019 at 12:38 PM

    It just keeps telling me I don't have permission to enable the APIs


    1569602329Snip20190927_2.png

  • Profile Image
    roneet
    Answered on September 27, 2019 at 01:23 PM

    Please make sure that you are signed in as the same person (the button next to the minimize button on chrome browser) as the account that you were using to log in to the developer's console to gain access.

    Please try logging out all other accounts and login to only one account. If that doesn't help try to login with some other account and try again.

    Also, you may try out these in incognito mode of the browser:

    https://support.google.com/chrome/answer/95464?co=GENIE.Platform%3DAndroid&hl=en

    Hope this helps.

  • Profile Image
    Philip_Seaton
    Answered on September 30, 2019 at 03:46 AM

    OK, so 2 things I don't get the page you are showing in this screenshot when I click on the link you gave.


    1569829449Snip20190930_3.png

    Instead I get this....

    1569829508Snip20190930_4.png

    It seems that all of the APIs are enabled but I can't see "Key Restrictions" or "API Restrictions" anywhere.

  • Profile Image
    Nik_C
    Answered on September 30, 2019 at 04:21 AM

    Try generating a new API key:

    https://developers.google.com/places/web-service/get-api-key

    Just follow that guide and you will be able to generate a new API key.

    Let us know if that works for you.

    Thank you.

  • Profile Image
    Philip_Seaton
    Answered on September 30, 2019 at 04:50 AM

    Great! Finally we are there! 


    I created a new API key and it seems to be working well


    Many thanks for all your support