Calculate the distance between one origin and multiple destinations


I want to calculate the distance between origin and multiple destinations like the user has started traveling from place A to Place B then Place B to Place C  and place C to Place D or  Place A to Place B and Place C to Place D and so on. I want to calculate the overall distance, not displacement. I have achieved the functionality of getting distance from one place to another with the help of google autocomplete And Distance matrix API but I want to get the distance of one place to multiple places, so how can I achieve it. I have two input fields for autocompletion of source and destination and expression to calculate the distance, I want to add a button or link so that on click user can open other input fields and select other places and get the overall distance.

thanks in advance & regards

Saurabh Singh Sengar

Hi Saurabh Sengar,

It is not possible to understand what you want to do, can you share an image of what you are trying to do, could it even be a mockup? or even better if an oml demo is possible.

What other api are you using?

In particular if I would have that requirement, I would first do it with javascript and html using visual code together with the Google maps library.

Once working, I would migrate it and make it reusable in outsystems and implement it in a project.

I hope it helps you in something.


Hi Saurabh Sengar, the Google Distance Matrix can provide the distance from one to multiple places, as long as you separate your different destinations with the pipe '|' sign
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.