html LRM-Valhalla的最低可行实施
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html LRM-Valhalla的最低可行实施相关的知识,希望对你有一定的参考价值。
<!DOCTYPE html>
<html>
<head>
<title>Simple Valhalla-backed Leaflet Routing Machine</title>
<link rel='stylesheet' href='//cdn.leafletjs.com/leaflet-0.7.3/leaflet.css'>
<link rel='stylesheet' href='./node_modules/lrm-valhalla/examples/leaflet.routing.valhalla.css'>
<script src='//cdn.leafletjs.com/leaflet-0.7.3/leaflet.js'></script>
<script src='./node_modules/leaflet-routing-machine/dist/leaflet-routing-machine.js'></script>
<script src='./node_modules/lrm-valhalla/dist/lrm-valhalla.js'></script>
<style>
#map {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id='map'></div>
<script>
var map = L.map('map');
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(map);
L.Routing.control({
waypoints: [
L.latLng(19.325, -99.079),
L.latLng(19.485, -99.193)
],
router: L.Routing.valhalla('valhalla-ycfG8AM', 'auto'),
formatter: new L.Routing.Valhalla.Formatter(),
summaryTemplate:'<div class="start">{name}</div><div class="info {transitmode}">{distance}, {time}</div>',
routeWhileDragging: true
}).addTo(map);
</script>
</body>
</html>
以上是关于html LRM-Valhalla的最低可行实施的主要内容,如果未能解决你的问题,请参考以下文章
使用脚本组件作为来自多个Microsoft Dynamics CRM实施的数据源是否可行?
javaweb基于局域网的信息收发系统.rar(毕业论文+程序开发)
件开发项目中,过程管理文档包含哪些
UVA 12124 - Assemble(二分)
001-软件开发过程中所需要的文档
开发文档相关要求