好你的问题很棘手,但还是让我从我得到的回答。 使用谷歌地图API,谷歌Places API的,地方台或者ID和谷歌地图的路线和距离JSON API。
let's take an example like you want walk or run 4kms from your places and comeback.
Case 1: if you want to opt for the same route from which you went to come back.
like you went from a-b then again you are coming bak from b-a.
for this case you can use Google maps geofencing and get the place inside a minimum raidus and make an algo to get the distance from your places.
if teh distance is half of the distance from your places then pick the most approximate place.
Use google maps json to get the places distance and google place picker for the location of nearby location object.
Case2: If you donot want to come from the same route through which you went
by, then select the nearest location object and get the longest route and follow
the same algo and procedure to get the distance.
已经有算法生成多段线,这些多段线基本上是从一点到另一点的路线。您可以使用该算法绘制路线。 Google API也可以帮助您计算距离。 – HaroldSer