maplibre-gl-indoorequal

Use indoor= with maplibre-gl.js. It require a basemap by Mapbox, MapTiler or any other vector style provider.

With npm

Install maplibre-gl-indoorequal.

npm install --save maplibre-gl-indoorequal

Then add the following code to your maplibre map:

import IndoorEqual from 'maplibre-gl-indoorequal';
import 'maplibre-gl-indoorequal/maplibre-gl-indoorequal.css';

const map = new maplibregl.Map({
  ... your code to initialize with mapbox, maptiler or other
});

const indoorEqual = new IndoorEqual(map, { apiKey: '<insert your api key here>' });
map.addControl(indoorEqual);

Browser

Add the following javascript and stylesheet in the head of your HTML page.

<script src="https://unpkg.com/maplibre-gl-indoorequal@latest/dist/maplibre-gl-indoorequal.umd.min.js"></script>
<link href="https://unpkg.com/maplibre-gl-indoorequal@latest/maplibre-gl-indoorequal.css" rel="stylesheet" />

Then add the following code to your maplibre map:

const map = new maplibre.Map({
  ... your code to initialize with mapbox, maptiler or other
});

const indoorEqual = new IndoorEqual(map, { apiKey: '<insert your api key here>' });
map.addControl(indoorEqual);

Learn more on how to use the maplibre-gl-indoorequal plugin with the API.