@wasac/mapbox-gl-admin-boundary

This module adds area switcher control which is able to zoom administrative boundaries to mapbox-gl

Usage no npm install needed!

<script type="module">
  import wasacMapboxGlAdminBoundary from 'https://cdn.skypack.dev/@wasac/mapbox-gl-admin-boundary';
</script>

README

mapbox-gl-admin-boundary

GitHub

This module adds area switcher control which is able to zoom administrative boundaries to mapbox-gl

Installation:

npm i @WASAC/mapbox-gl-admin-boundary

Demo:

See demo.

Test:

npm run build
npm start

open http://localhost:8080.

Usage:

import MapboxAdminBoundaryControl from "mapbox-gl-admin-boundary";
import { Map as MapboxMap } from "mapbox-gl";

import "mapbox-gl-admin-boundary/css/styles.css";

const map = new MapboxMap();
map.addControl(new MapboxAdminBoundaryControl(
        'https://wasac.github.io/rw-admin-boundary'
    ), 'top-right');