17.2.0 • Published 8 months ago

@mapgis/mapbox-gl-draw-static-mode v17.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

Mapbox Draw Static Mode

This is a custom mode for @mapbox/mapbox-gl-draw that displays data stored in Draw but does not let the user interact with it.

This mode used to be one of the core modes prior to the v1.0.0 release of Mapbox Draw.

Usage

To install:

npm i @mapbox/mapbox-gl-draw-static-mode

To add to MapboxDraw:

var StaticMode = require('@mapbox/mapbox-gl-draw-static-mode');

var map = new mapboxgl.Map({
  container: 'map',
  style: 'mapbox://styles/mapbox/streets-v8',
  center: [40, -74.50],
  zoom: 9
});

var modes = MapboxDraw.modes;
modes.static = StaticMode;
var Draw = new MapboxDraw({ modes: modes });

map.addControl(Draw)

map.on('load', function() {
  Draw.changeMode('static');
});
17.2.0

8 months ago

17.0.0

11 months ago

16.6.0

2 years ago

16.4.0

2 years ago

16.2.0

2 years ago