Problems with distance calculator widget

  • dcombellack
    Asked on February 10, 2021 at 11:43 AM

    Hi,

    We are trying to make use of the distance calculator widget in order to calculate delivery prices.

    However, after entering our google maps API key, it does not seem to be working.

    I've created a test form to try to get it working before embedding it into one of our existing forms, https://form.jotform.com/210404850065042

    However, as soon as you begin to enter an address (I assume it would start to look up the address as you type?) it gives us the error in the attached screenshot.

    Any ideas, please?

    Many thanks1612975422 60240d3e56ba5 error Screenshot 10

  • Basil JotForm Support
    Replied on February 10, 2021 at 3:14 PM

    Hi,

    I have checked the form that you are referring to and it seems there is an error with your API key.

    The error: "ApiNotActivatedMapError"

    1612987552 60243ca0515ea chrome KrflNb2B Screenshot 10

    You can find the error within the link below:

    https://developers.google.com/maps/documentation/javascript/error-messages#api-not-activated-map-error

    1612987699 60243d33b25e9 ShareX k82UiWMa Screenshot 21

    You need to activate your Maps Javascript API. you can follow the instructions by clicking the learn more option in the link that I provided.

    Please let us know if you require any further assistance.



  • dcombellack
    Replied on February 11, 2021 at 7:50 AM

    Hi,

    Many thanks for your response, we have managed to get it working now.

    Could you please tell me if there is any way to insert another fields value into the "destination" field of the widget?

    Ideally we would like the user to type their postcode into a text field, and then for this to be inserted into the widget which will be hidden and only exists to do the calculations.

    This is where I am so far, https://form.jotform.com/210404850065042

    Many thanks

  • Richie JotForm Support
    Replied on February 11, 2021 at 8:11 AM

    Unfortunately, it is not possible to insert fields values in the widget.

    The calculation is done by the distance calculator widget.

    If you have further questions, let us know.