我一直的位置阵列检测来自位置的数组最近的位置:{“PLACE1”,‘place2’,“place3”} * //这些地址通过使用谷歌地图API的
现在假设有一个新位置:'place4'。
欲检测哪一个是最接近“place4” ....从位置上述阵列比较....
即跟踪从位置阵列的点的最近的位置... (使用谷歌地图API的)..
伪代码:
foreach(var item in array)
{
var i = TrackNearestLocationByGoogleMapAPIs(item);
if(i is nerest)
{
print(i); and go out of loop...
}
}