请求例子:
apirq('line/wayplan', {
data: {
"mode": "netid",
"from": "155a4f2767ea880e", // 眉山
"to": "c84dfc14b0fe119f" // 江夏
}
})
返回数据结果:
{
"code": 0,
"msg": "ok",
"time": "1524131393",
"data": [
[
{
"type": "point",
"point": {
"id": "155a4f2767ea880e",
"name": "眉山",
"coordinate": {
"x": 30.06632,
"y": 103.822906
}
}
},
{
"type": "way",
"line": {
"id": "87ae003f21a6dfda",
"name": "眉山->长沙",
"way": [
"155a4f2767ea880e",
"a6bf2a0c694e4117"
]
},
"from": {
"id": "155a4f2767ea880e",
"name": "眉山",
"coordinate": {
"x": 30.06632,
"y": 103.822906
}
},
"to": {
"id": "a6bf2a0c694e4117",
"name": "长沙",
"coordinate": {
"x": 113.00884,
"y": 28.191049
}
},
"distance": 17652418.900501
},
{
"type": "point",
"point": {
"id": "a6bf2a0c694e4117",
"name": "长沙",
"coordinate": {
"x": 113.00884,
"y": 28.191049
}
}
},
{
"type": "way",
"line": {
"id": "9437234ced99aaa9",
"name": "长沙->江夏",
"way": [
"a6bf2a0c694e4117",
"c84dfc14b0fe119f"
]
},
"from": {
"id": "a6bf2a0c694e4117",
"name": "长沙",
"coordinate": {
"x": 113.00884,
"y": 28.191049
}
},
"to": {
"id": "c84dfc14b0fe119f",
"name": "江夏",
"coordinate": {
"x": 113.283244,
"y": 23.211662
}
},
"distance": 584849.33885428
},
{
"type": "point",
"point": {
"id": "c84dfc14b0fe119f",
"name": "江夏",
"coordinate": {
"x": 113.283244,
"y": 23.211662
}
}
}
]
]
}