Widget "Geolocation" is showing error "something went wrong" and not fetching coordinates when form is submitted.

  • Profile Image
    sambandh
    Asked on October 22, 2019 at 01:36 AM

    Hello,

    I have entered the Google Map API in the widget. However, it still does not capture the coordinates. 

    Map is also not getting loaded.

    Screenshot
  • Profile Image
    mustafaculban
    Answered on October 22, 2019 at 02:48 AM

    Hi sambandh,

    Could please share the form link with us that you are facing this issue?

    Also please make sure that you have entered your Google Maps API Key to properly use the Map. 

    Here is a reference to get the API key.
    https://developers.google.com/maps/documentation/javascript/get-api-key

     

  • Profile Image
    sambandh
    Answered on October 22, 2019 at 05:18 AM

    https://www.jotform.com/build/92870503029456


    I entered google API but it still does not capturing the location.

  • Profile Image
    AndrewHag
    Answered on October 22, 2019 at 06:39 AM

    I am not able to find the Geolocation widget in the form 92870503029456. Could you please help in locating the widget in your form? 

    You can also share a screenshot of the field with us.

  • Profile Image
    mustafaculban
    Answered on October 22, 2019 at 06:46 AM

    Also, you need to enable 'Maps JavaScript API' and other Web related APIs on Google Cloud Console( the place where you take your API key) to make your API key to work with embedded Maps.

    Please see the following page 

    https://developers.google.com/maps/gmp-get-started#api-key

  • Profile Image
    sambandh
    Answered on October 22, 2019 at 06:54 AM

    Sorry. I was testing something. Might have deleted the widget. 
    I have put it in the first page of the form with google map API. 

    Please check it now.  

     'Maps JavaScript API'  is also enabled in Google Cloud Platform. 


    1571741593Enabled APIs.PNG


  • Profile Image
    mustafaculban
    Answered on October 22, 2019 at 07:03 AM

    Hi sambandh,

    Have you restricted to access to this API key? As I see, it is not accepting the request(s) coming from Jotform servers.

    Error is : Google Maps JavaScript API error: RefererNotAllowedMapError 

    You can check the Google documentation for this error 
    https://developers.google.com/maps/documentation/javascript/error-messages

    I am able to add the Map to one of my test form without restricting it.


  • Profile Image
    sambandh
    Answered on October 22, 2019 at 07:14 AM

    I have restricted it to HTTP. Now I have changed it to none. However, it is still not working. 

    1571742865API restrictions.PNG 

  • Profile Image
    mustafaculban
    Answered on October 22, 2019 at 07:19 AM

    Hi sambandh,

    Now the error indicates that; 

    You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable

    Learn more at https://developers.google.com/maps/gmp-get-started

    Please let us know once you enable it.