Console error for Location Coordinates Widget

  • Profile Image
    Asked on August 15, 2019 at 03:10 PM

     I am new to jot form. I would like to be able to have someone take a survey, drop a pin on a map, and have the coordinates extracted as well as some political administrative divisions.

    The location coordinates widget seemed great but when I pasted the API key I got from google, I received this: This page didn't load Google Maps correctly. See the JavaScript console for technical details.

    what went wrong and what do I do to get the map to work? I am not even sure where the javascript console is, and I don't know that syntax anyway.


    Thanks!

    Screenshot
  • Profile Image
    IvayloK
    Answered on August 15, 2019 at 03:39 PM

    I tested the Location Coordinates widget and it worked fine for me.

    It looks like that the problem is in your API key. Please make sure that your API key is for Google Maps.

    You can create an API key here:

    https://developers.google.com/maps/documentation/javascript/get-api-key

    Or open the link below, if you already have one:

    https://console.developers.google.com/projectselector2/apis/credentials


  • Profile Image
    dena 
    Answered on August 15, 2019 at 04:58 PM

    Thanks - I did follow these instructions, but perhaps am still doing something wrong. I just tried again and got the same answer.

    Perhaps I am doing something wrong in the API setup?

    For example, On the Restrict and rename API key page, I selected HTTP referrers (web sites), and then added https://www.jotform.com/

    I did however have issue finding the Maps JavaScript API restrict key as an option in the dropdown under API restrictions.

    What else could help fix the issue?

  • Profile Image
    Vanessa_T
    Answered on August 15, 2019 at 05:32 PM

    You need to add a trailing * to your URL so that all requests coming from Jotform is allowed. Please change it from this

    https://www.jotform.com/

    to 

    https://www.jotform.com/*


    If the issue still persists, please post a screenshot of your API settings.

    How-to-Post-Screenshots-to-Our-Support-Forum

    With regards to your question about Javascript Console, you can view console by following this guide:

    How-to-get-a-console-report-from-most-common-browsers