You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
2 years ago | |
|---|---|---|
| lib | 2 years ago | |
| .gitignore | 2 years ago | |
| README.MD | 2 years ago | |
| index.js | 2 years ago | |
| package.json | 2 years ago | |
README.MD
寻路 Node 服务
安装
npm install
运行
npm start
技术栈
node + express
node 版本 18.19.0
接口
1. 获取导航坐标
GET: /navigation
参数格式:
参数
{
"startlng": 117.835987, // 起点经度
"startlat": 35.503035, // 起点纬度
"endlng": 117.887029, // 终点经度
"endlat": 35.4879820, // 终点纬度
"areaname":"pingyixian", // 区域名称: pingyixian/feixian/yishuixian
"router":"postgis", // 导航类型 postgis/all
}
返回数据格式:
返回值
{
"code": 200,
"msg": "success",
"data": {
"allCoordinates": [
[
117.83705644100004,
35.502679814000075
],
[
117.83869465300005,
35.50162832200003
],
...
...
]
}
}