Google API key not working in Driving distance calculator

  • Turbbox
    Asked on July 6, 2020 at 1:28 AM

    Hello to whom it may concern,


    1. I have been trying to integrate my form into my website but when I try to put in the address on the form, the geolocation does not work on my website.


    2. I tried the widget distance calculator and followed the steps for the Google API Key and it seems like it is not working.


    Thank you in advance for your support.


    Best regards,

    Jenny Gonzalez

  • Richie JotForm Support
    Replied on July 6, 2020 at 5:43 AM

    I have checked your form and it seems you may have not activated a Google API library.

    Google API key not working in Driving distance calculator Image 10

    Please enable all possible map API in your Google API.

    Google API key not working in Driving distance calculator Image 21

    https://www.jotform.com/help/597-How-to-get-Google-Maps-API-Key-for-JotForm-mapping-widgets

    Please give it a try and let us know how it goes.

  • Turbbox
    Replied on July 7, 2020 at 7:28 PM
    hello support team,
    seems like my geolocation is not working after activating al Api's
    [cid:71bea1c3-363b-4d82-954c-56b6704810cc]
    ________________________________
    ...
  • jherwin
    Replied on July 7, 2020 at 11:53 PM

    Please go to your Google Console "APIs & Services" and set the Application restrictions to "None". Or, if you are using the HTTP referrers option, please add these domains to the website restrictions.

    https://data-widgets.jotform.io/*

    https://widgets.jotform.io/*

    https://app-widgets.jotform.io/*

    Please see screenshot below for reference:
    1585015889widgets Screenshot 10
    When you do a change it can take 5-10 minutes for updating.

    Please give it a try and let us know how it goes.

  • Turbbox
    Replied on July 9, 2020 at 5:28 PM
    Hi Jotform support,
    In my products, how come I don't have the options of the attache pictures, by settings and and have the product list layout?

    Furthermore, after following your guidelines on my API, my geolocation and the driving distance calculation still not working.
    Thank you
    Best regards,
    Jenny Gonzalez
    ________________________________
    ...
  • Amin JotForm Support
    Replied on July 9, 2020 at 10:42 PM

    I've cloned your form, used a valid Google Maps API key of mine, and been able to replicate no issues with the "Driving Distance" widget.

    1594349216Screenshot 2020 07 10 Clone of Screenshot 10

     

    Please try with a different Google Maps API key and let us know how it goes.

    Kindly note that I've moved your last inquiry to another support ticket so it can be better addressed. You may navigate to it by clicking here.

    Your understanding is most appreciated.

  • Turbbox
    Replied on July 10, 2020 at 2:28 PM
    Hello,
    I had regenerated my API Key and still not working. what else can I do?
    ________________________________
    ...
  • KrisLei Jotform Support
    Replied on July 10, 2020 at 6:59 PM

     Hi Jenny,

    I have tested your form and it's showing me an Invalid Result (error: Request_Denied) but there are no errors on the console logs:

    1594421086Console logs Screenshot 10

    Kindly verify it on your end if you have also added the following websites on the HTTP referrers (websites):

    https://*.jotform.com/*

    https://*.jotform.io/*

    https://*.widgets.com/*

    https://*.widgets.io/*

    Additionally, please also verify if you have activated the "Geocoding API" if not activated yet (in search area type "Geocoding", "Geolocation" and press enable). Then create a new API key and please try NOT to add any restrictions or referrers, let's see if that fixes the issue.

    1556002807Google Map API Screenshot 21

    1556002941Geo Screenshot 32


    If you are showing a different error please provide us with a screenshot of the console logs report(How to get a console report from most common browsers?). Also, kindly follow this guide to post your screenshot, as we are unable to view images attached to emails: How-to-Post-Screenshots-to-Our-Support-Forum

    Thank you. Looking forward to your response.

  • Turbbox
    Replied on July 10, 2020 at 8:28 PM
    Hello,
    all are enabled...
    What can I do?
    Thank you in advance
    ________________________________
    ...
  • Jed_C
    Replied on July 10, 2020 at 10:25 PM

    Please go to this link and confirm if you see "Enable" or "Manage" button? If you don't see the Manage button, please click on the Enable button. Also, for it to work, you need to have a billing account. I assumed that you have already enabled your billing, correct?

  • Turbbox
    Replied on July 12, 2020 at 1:28 AM
    Hello,
    I can see the manage button. I created a new form almost same format with driving distance calculator but nothing in fact is the same error message that you got earlier: Request denied. I do have a billing account linked to the project. Anyway we can start with a Jotform API Key?
    Thank you
    Best regards,
    Jenny Gonzalez
    ...
  • Girish JotForm Support
    Replied on July 12, 2020 at 2:21 AM

    Hello Jenny,

    Sorry, but the widget requires a Google Maps API to function.

    I've tested the Driving Distance Calculator on a demo test form with a valid Google Maps API and the widget is working fine as required.

    Would it be possible for you to check with Google support if there are any limitations on your Google project or console that's causing the issue on your Google Maps API?

  • Turbbox
    Replied on July 12, 2020 at 3:28 AM
    Hi, Yes that was going to be my next step. Thanks a lot for your support and patience.
    Best regards,
    Jenny Gonzalez
    Get Outlook for iOS
    ________________________________
    ...