如何在两个位置之间的某个距离获得位置的经度和纬度?

时间:2015-07-08 18:00:23

标签: google-maps google-maps-api-3 maps

我有来自google maps API的路由json回复。路线结构就像..

{
"routes": [
    {
        "legs": [
            {
                "distance": {
                    "text": "1.8 mi",
                    "value": 2859
                },
                "duration": {
                    "text": "9 mins",
                    "value": 515
                },
                "end_location": {
                    "lat": 42.3781746,
                    "lng": -71.06022609999999
                },
                "start_address": "Boston, MA, USA",
                "start_location": {
                    "lat": 42.359824,
                    "lng": -71.05981249999999
                },
                "steps": [... ],
                "via_waypoint": []
            }
        ],
        "summary": "N Washington St and Chelsea St"
    }
],
"status": "OK"

}

我希望获得一个包含latitudelongitude的位置1.2 kms远离start_location且位于path到{{1}之间的位置}。

0 个答案:

没有答案