叶片跑道机

此插件几乎无法维护 ! 自从我有理由与路由或叶片合作以来,这已经很长一段时间了,看起来不会改变。 我不花时间来维护这个插件, 如果你想接任维护者 随时联系我 个人信息。 。 。 .
在叶片地图上找到从A到B的路. 插件支持多个后端 :
- OSRM 操作程序 - 内置和默认使用(第5版)
- 映射框方向 API - 与班级搭建
L.Routing.Mapbox - 图表Hopper - 通过插件 缩写
- 马普森·瓦尔哈拉 - 通过插件 瓦尔哈拉
- TomTom 在线运行 API - 通过插件 轻而易举 以 马蒂亚斯·罗恩斯托克
- 通过插件支持OSRM版本 4 的后遗症 错误4
- Esri - 通过插件 爱丽丝
特征
- 标准的叶片控制,叶片的外观和感觉
- 从起点到目的地,有可能通过点数
- 通过地址输入和使用地图添加、编辑并去除出出处
- 多种语言支持
- 高度定制用于高级用途
- 自定义外观( 它们/ 皮肤)
- 根据ISC许可证发布的开源(与麻省理工学院许可证大致相当)
转到 叶花跑道机器站点 需要更多信息、演示、辅导等.
2020-04-06增订: 出道后,Leaflet跑道机依赖于OSRM的演示服务器. 此时,演示服务器(在插件范围之外,且插件作者不受控制)是 不再维护, 且其 SSL 证书已过期。该插件将无法工作,除非您 配置路由后端 你自己来 我很遗憾地说,据我所知,不存在好的违约.
支助和新特点
Leaflet Routing Machine在许多方面已经是一个完整的路由UI特性. 最有可能的是,你的要求已经得到满足了,不需要多少适应.
关于问题和讨论,你不妨看看 叶片跑步机闪光器。 。 。 .
大楼
yarn bundle
这需要 节点和npm,或 yarn。 。 。 .
使用量
下载 最新发布,或通过 unpkg.com (英语)。 。 。 .
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet-routing-machine.css" />
<script src="https://unpkg.com/[email protected]/dist/leaflet-routing-machine.js"></script>
或通过npm/yarn:
npm install --save @fleetbase/leaflet-routing-machine
yarn add @fleetbase/leaflet-routing-machine
import * as L from 'leaflet';
import { OSRMv1, Control as RoutingControl } from '@fleetbase/leaflet-routing-machine';
const map = new L.Map();
const serviceUrl = 'https://routing.fleetbase.io';
const router = new OSRMv1({ serviceUrl, profile: 'driving' });
const routingControl = new RoutingControl({ waypoints: [...], router }).addTo(leafletMap);
自定义路口标记
您可以自定义路口标记 markerOptions 选项 RoutingControl。 。 。 .
import * as L from 'leaflet';
import { OSRMv1, Control as RoutingControl } from '@fleetbase/leaflet-routing-machine';
const map = new L.Map();
const serviceUrl = 'https://routing.fleetbase.io';
const router = new OSRMv1({ serviceUrl, profile: 'driving' });
const routingControl = new RoutingControl({
waypoints: [...],
markerOptions: {
icon: L.icon({ ... })
},
router
}).addTo(leafletMap);
转到 叶花跑道机器站点 需要更多信息、演示、辅导等.