I am trying to create an app integrated with Google Map, but I am unsure how to use the “distance calculation”. I read the document again and again, but I still couldn’t figure out how exactly the “distance calculation” works. Thanks.
Looking at the Google Maps integration documentation, they show a button with a calculate distance action. When you configure the action, you set the the starting and ending addresses, and when the action is called when the button is clicked, it returns Distance and Duration values that you can write to other columns in your table. Which part are you having trouble with?
Make sure you have API key set up and make a request like this: https://maps.googleapis.com/maps/api/directions/json?origin=origin_address&destination=destination_address&key=your_api_key.
This is built in already using the Google Maps integration. You don’t need to do an API call.
I just realised that I need to add boxes for the “start and ending addresses” on the layout page, which is not mentioned in the documentation. I have added it and it worked well. Thanks again for the help!
Thanks for catching that! I’ll let our docs team know.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.