Skip to content

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

License

Notifications You must be signed in to change notification settings

WASAC/mapbox-gl-admin-boundary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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');