Reputation: 461
I have a list of Points-of-Interest (e.g. car rest areas).
The user selects the Starting Point and the Ending Point. This generates a route.
Google Maps SDK
or OSRM
offer this functionality?Thank you, Nick
Upvotes: 0
Views: 348
Reputation: 649
In order to accomplish this, you have to store your road in a mathematical fashion:
With this Api you can calculate distance till 2500 origins * destinations points. The result will give you an array of rows, with each row corresponding
to an origin, and each element within that row corresponds to a pairing of the origin with a destination value.
Example of a request:
https://maps.googleapis.com/maps/api/distancematrix/json?units=metric&origins=32.777211,35.021250&destinations=32.778663,35.015757&key=YOURAPIKEY
This is very useful to your goal, because lets you specify more than one points of which calculates distance.
Upvotes: 1