/maplibre-gl-directions

Primary LanguageJavaScriptISC LicenseISC

MapLibre GL Directions

A directions plugin for MapLibre GL JS using the Open Source Routing Machine OSRM routing engine, Nominatim and open data from the OpenStreetMap project. This plugin was originally developed for Mapbox (https://github.com/mapbox/mapbox-gl-directions) and was migrated to MapLibre.

Code example

Examples

Full Example without the need of a token

Full Example with the need of a token

Usage

Methods

Live examples

Installation

Native

Add tags referencing maplibre-gl-directions after adding maplibre-gl to your website:

<!-- MapLibre GL -->
<link href="https://unpkg.com/maplibre-gl@1.14.0/dist/maplibre-gl.css" rel='stylesheet' />
<link href="maplibre-gl-compare.css" rel='stylesheet' />

<script src="https://unpkg.com/maplibre-gl@1.14.0/dist/maplibre-gl.js"></script>
<script src="maplibre-gl-directions.js"></script>

Node

Motivation

This project makes it possible to easily add a direction control to a MapLibre map.

API Reference

API Reference

Bug Reports & Feature Requests

Please use the issue tracker to report any bugs or file feature requests.

Licence

ISC © MapLibre © Mapbox