How can I get the google maps geo location tool to work?

  • Profile Image
    Lebro
    Asked on August 16, 2019 at 03:25 PM

    I have followed the steps precisely and still am having no luck can you help please?


    Thanks.


    Also can I have my jotform.com.printit/submission instead of https://form.jotform.com/Lebro/submission ?

  • Profile Image
    Kevin_G
    Answered on August 16, 2019 at 04:12 PM

    I have checked your form and was able to see the issue; however, upon checking the console I can see an error about the API key used: 

    15659860342019-08-16_13h56_34.png

    The error redirects to this link: https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error 

    I would recommend you to try double checking your API key and make sure it's allowed to be used on Google Maps, kindly note that if there is a restriction with the API from the Google's end, there is not anything we can do, unfortunately. 

    You may also go here and create a new API key: https://developers.google.com/maps/documentation/javascript/get-api-key 

    I have also performed some tests on a form with the widget and it works when I add my key: https://form.jotform.com/90147528051958 

    Let us know if you need further assistance. 

  • Profile Image
    Lebro
    Answered on August 16, 2019 at 04:25 PM

    Hi Kevin,


    Thanks for your quick response. You are correct the app works but... when I got to restrict it.  I am having issues.  So what website do you have listed in your "http referrers"?

    Ive tried https://jotform.com, https://jotform.com* and https://form.jotform.com/Lebro/submission

     

  • Profile Image
    BDAVID
    Answered on August 16, 2019 at 05:22 PM

    I have checked your form, and it seems like you removed the Geolocation widget. Why do you need the Jotform domains for? The widget does not require further configuration other than the one shown on its settings:

    1565990495geolocation.gif

  • Profile Image
    Lebro
    Answered on August 16, 2019 at 10:18 PM
    I deleted it because it doesnt work when embedded in a website. Jotform
    requests to use your location. It won't embedded. It comes up blank.
    The reason you put restrictions on the api is so its not copied and used
    elsewhere because its a paid service and recommended by google
    ...
  • Profile Image
    Kevin_G
    Answered on August 17, 2019 at 12:23 AM

    Kindly note that the API key used in the widget is not provided by Jotform so any limits in there are implemented by Google instead. 

    Now, I can see you mentioned your form is embedded, does the widget work on the standalone version, but it doesn't when you embed it? If it's embedded you may share us the link here so we can test it further. 

    This should work as expected no matter if the form is embedded or not, as per my tests, using a key under a free Google account the widget works, the issue may also be related to limitations on your Google account in case you're using a corporate one, in such case you need to contact your account administrator and ask to check this. 

    To test the widget you may also get a new API key using a free Gmail account, it should work. 


  • Profile Image
    Lebro
    Answered on August 17, 2019 at 12:43 AM
    I added it again. https://www.printitprints.com/form
    ...
  • Profile Image
    Lebro
    Answered on August 17, 2019 at 12:43 AM
    This time I used a personal API instead of corporate
    ...
  • Profile Image
    ashwin_d
    Answered on August 17, 2019 at 06:13 AM

    I did test your form with its direct URL and it seems to load the Geolocation widget correctly and it is also loaded in embedded form as well. Please check the screenshot below:

    1566036710embeddedWidget.png

    In which browser you are having this issue with? Please let us know and we will take a look.

    We will wait for your response.

  • Profile Image
    Lebro
    Answered on August 17, 2019 at 10:43 AM
    Chrome and Safari
    ...
  • Profile Image
    Lebro
    Answered on August 17, 2019 at 10:43 AM
    Heres on chrome
    ...
  • Profile Image
    KrisLei
    Answered on August 17, 2019 at 11:53 AM

    Hi,

    Attached screenshots via Email is not supported by the Forum Page. Here's a guide on posting a screenshot on threads:

    https://www.jotform.com/help/438-How-to-Post-Screenshots-to-Our-Support-Forum

    I was able to replicate the problem on my end too. Upon checking on the embedded form it seems that you are correct when you are trying to restrict the site the Geolocation is not loading properly. I saw this error: 

    1566056840geolocation.JPG

    'This error is not related to JotForm.

    When a user visits a page served over HTTPS, their connection with the webserver is encrypted with TLS and hence safeguarded from sniffers and man-in-the-middle attacks.

    If the HTTPS page includes content retrieved through regular, cleartext HTTP, then the connection is only partially encrypted: the unencrypted content is accessible to sniffers and can be modified by man-in-the-middle attackers, and therefore the connection is not safeguarded anymore. When a webpage exhibits this behavior, it is called a mixed content page.

    Your Jotform form is HTTP and site HTTPS and because of that, your form is not shown. You need to make your form to be SSL or there is a workaround that will request from a user to click on the option to "Load unsafe script" inside of the browser. '

    One of my colleagues were able to address this issue with a workaround: 

     In Chrome:

       On the right side of the Chrome address bar, click on the shield icon, then click "Load unsafe script". 

    In Firefox:

      1. On the left side of the Firefox address bar, click on the shield icon.

       2. After loading unsafe content your form will be visible on the site.

    Or you can refer to this thread: https://www.jotform.com/answers/555436-Form-is-not-visible-on-website

    I hope this helps.

  • Profile Image
    Lebro
    Answered on August 17, 2019 at 12:43 PM
    actually Safari works, just not chrome
    ...
  • Profile Image
    Lebro
    Answered on August 17, 2019 at 01:43 PM
    Hi there is no shield on the address bar unless there is unsafe script.
    This is not the case.
    I have tried this on Mac IOS tablet. Shows blank
    Android phone, shows blank with both chrome browser and samsung browser.
    I don't know a work around for it, but if you do please let me know.
    Thanks for trying.
    ...
  • Profile Image
    Welvin
    Answered on August 17, 2019 at 03:09 PM

    Have you figured this out already? I checked the form through the devices that you have mentioned, and it prompts me to access my location. That means the map widget now worked.

    If you still cannot get it to work, kindly check your permission settings. If location is disabled on your device, the map won't work since there is no prompt in the first place to start with. You need to enable location and allow the form when you are prompted.

    As for the key restriction on the Map API, please add the following:

    1. Application restrictions. 

    a. Select HTTP referrers (web sites).

    b. Add the following:

    https://*.jotform.com/*

    https://*.jotform.us/* 

    https://*.jotform.io/*

    https://*.widgets.com/*

    https://*.widgets.io/*

    2. API restrictions

    a. Select Don't restrict key

    I hope that helps. Please let us know if you need further assistance.

  • Profile Image
    Lebro
    Answered on August 17, 2019 at 05:43 PM
    I think you are new to this conversation. Yes Jotform works. The issue was
    having the form embedded into a website or iframe. As seen on
    printitprints.com/form
    We are trying to get this to work specifically.
    ...
  • Profile Image
    KrisLei
    Answered on August 17, 2019 at 06:31 PM

    Hello,

    I apologize for the confusion, kindly attach a screenshot of the errors on your browser's console logs to help us narrow down the problem. Once we have identified the issue or errors on your end it would be a lot easier to come up with the resolution. 

    Please access this thread to post the screenshots.

    https://www.jotform.com/help/438-How-to-Post-Screenshots-to-Our-Support-Forum

    Also, I was able to replicate the issue on my end when I access the direct URL: https://www.printitprints.com/form in Chrome, but one of our colleagues was able to load the geolocation widget on his end. We need to make sure if this is a bug before we could escalate it to our developers. 

    Thank you.

  • Profile Image
    Tony  
    Answered on August 17, 2019 at 06:51 PM

    1566082249Screen Shot 2019-08-17 at 3.48

  • Profile Image
    roneet
    Answered on August 17, 2019 at 10:28 PM

    From your screenshot, it seems that the browser's location settings are blocked.

    15660951201.PNG

    If you won't mind then could you please check the browser's settings to see if the location is blocked.

    Guide: https://www.howtogeek.com/howto/16404/how-to-disable-the-new-geolocation-feature-in-google-chrome/

    Guide: https://www.lifewire.com/denying-access-to-your-location-4027789

    Let us know how it goes.

    Thanks.