我有来自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"
}
我希望获得一个包含latitude
和longitude
的位置1.2 kms
远离start_location
且位于path
到{{1}之间的位置}。