Mapbox-gl-indoorequal

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

With npm

Install mapbox-gl-indoorequal.

npm install --save mapbox-gl-indoorequal

Then add the following code to your mapbox-gl map:

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

const map = new mapboxgl.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/mapbox-gl-indoorequal@latest/dist/mapbox-gl-indoorequal.umd.min.js"></script>
<link href="https://unpkg.com/mapbox-gl-indoorequal@latest/mapbox-gl-indoorequal.css" rel="stylesheet" />

Then add the following code to your mapbox-gl map:

const map = new mapboxgl.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 mapbox-gl-indoorequal plugin with the API.