@locatienet/leaflet-routing
v1.0.31
Published
A Locatienet plugin routing for Leaflet Routing Machine
Downloads
20
Readme
Locatienet Leaflet Routing
Locatienet Routing using the Leaflet Routing Machine
📖 Usage
To install the package, run:
Download latest release, or obtain the latest release via unpkg.com.
<script src="https://unpkg.com/@locatienet/leaflet-searchaddress/dist/leaflet-routing.js?apikey=aa101d91-bc54-4c68-b0ea-12dbfe116bf6"></script>or via npm:
npm install --save @locatienet/leaflet-routingExample of use with Leaflet:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Locatienet Leaflet Routing Demo</title>
<style>
body, html { height: 100%; margin: 0; } #map { height: 100%; width: 100%; }
</style>
</head>
<body>
<div id="map"></div>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script src="https://unpkg.com/@locatienet/leaflet-tilelayer/dist/leaflet-tilelayer.js?apikey=YOUR_API_KEY_HERE"></script>
<script>
const map = L.map('map').setView([52.1, 5.1], 7);
L.locatienetTileLayer().addTo(map);
</script>
</body>
</html>
📜 License
Distributed under MIT license.
