Problems with distance calculator widget

  • Profile Image
    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.JPG

  • Profile Image
    Basil_A
    Answered on February 10, 2021 at 03: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

    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

    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.



  • Profile Image
    dcombellack
    Answered on February 11, 2021 at 07: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

  • Profile Image
    Richie_P
    Answered on February 11, 2021 at 08: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.