1.0.10 • Published 5 years ago
mapbox-gl-map-extract v1.0.10
mapbox-gl-map-download
Add a map download control to Mapbox GL JS.
Usage
mapbox-gl-map-download is a Mapbox GL JS plugin that you can easily add on top of your map.
When using NPM
Check how to use Mapbox GL JS in a module bundler.
npm install --save mapbox-gl-map-extract
const mapboxgl = require('mapbox-gl')
const MapDownload = require('mapbox-gl-map-extract');
const map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/traffic-night-v2',
center: [-77.0259, 38.9010],
zoom: 9
});
map.on('load', () => {
map.addControl(new MapDownload());
});
Develop
Run locally
npm install
Create a minified standalone build.
npm install
npm run build