mapbox-gl-draw

A drawing component for Mapbox GL JS

This module is now under the @mapbox namespace: install @mapbox/mapbox-gl-draw instead
Last updated 4 years ago by mcwhittemore .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install mapbox-gl-draw 
SYNC missed versions from official npm registry.

mapbox-gl-draw.js

Adds support for drawing and editing features on mapbox-gl.js maps.

Circle CI

Requires mapbox-gl-js@0.27.0 or higher.

Installing

npm install mapbox-gl-draw

Draw ships with CSS, make sure you include it in your build. It can be found on our CDN or at require('mapbox-gl-draw/dist/mapbox-gl-draw.css').

<link rel='stylesheet' href='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-draw/v0.14.0/mapbox-gl-draw.css' type='text/css' />

Usage in your application

When using modules

var mapboxgl = require('mapbox-gl');
var MapboxDraw = require('mapbox-gl-draw');

When using a CDN

<script src='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-draw/v0.14.0/mapbox-gl-draw.js'></script>

Example setup

mapboxgl.accessToken = 'YOUR_ACCESS_TOKEN';

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

var Draw = new MapboxDraw();

map.addControl(Draw)

See API.md for complete reference.

Developing and testing

Install dependencies, build the source files and crank up a server via:

git clone git@github.com:mapbox/mapbox-gl-draw.git
npm install
npm start & open http://localhost:9966/debug/?access_token=<token>

Testing

npm run test

Publishing

To github and npm

npm version (major|minor|patch)
git push --tags
git push
npm publish

To add to CDN add the js and css files from the dist folder to mapbox-gl-plugins.

Naming actions

We're trying to follow standards when naming things. Here is a collection of links where we look for inspriation.

Current Tags

  • 0.16.0                                ...           latest (4 years ago)
  • 0.11.9                                ...           next (5 years ago)

94 Versions

  • 0.16.0 [deprecated]           ...           4 years ago
  • 0.15.0 [deprecated]           ...           4 years ago
  • 0.14.0 [deprecated]           ...           4 years ago
  • 0.13.2 [deprecated]           ...           4 years ago
  • 0.13.1 [deprecated]           ...           4 years ago
  • 0.13.0 [deprecated]           ...           4 years ago
  • 0.12.2 [deprecated]           ...           4 years ago
  • 0.12.1 [deprecated]           ...           4 years ago
  • 0.12.0 [deprecated]           ...           4 years ago
  • 0.11.21 [deprecated]           ...           4 years ago
  • 0.11.20 [deprecated]           ...           4 years ago
  • 0.11.19 [deprecated]           ...           4 years ago
  • 0.11.18 [deprecated]           ...           4 years ago
  • 0.11.17 [deprecated]           ...           4 years ago
  • 0.11.16 [deprecated]           ...           4 years ago
  • 0.11.15 [deprecated]           ...           4 years ago
  • 0.11.14 [deprecated]           ...           4 years ago
  • 0.11.13 [deprecated]           ...           5 years ago
  • 0.11.12 [deprecated]           ...           5 years ago
  • 0.11.11 [deprecated]           ...           5 years ago
  • 0.11.10 [deprecated]           ...           5 years ago
  • 0.11.9 [deprecated]           ...           5 years ago
  • 0.11.8 [deprecated]           ...           5 years ago
  • 0.11.7 [deprecated]           ...           5 years ago
  • 0.11.6 [deprecated]           ...           5 years ago
  • 0.11.5 [deprecated]           ...           5 years ago
  • 0.11.4 [deprecated]           ...           5 years ago
  • 0.11.3 [deprecated]           ...           5 years ago
  • 0.11.2 [deprecated]           ...           5 years ago
  • 0.11.1 [deprecated]           ...           5 years ago
  • 0.11.0 [deprecated]           ...           5 years ago
  • 0.10.0 [deprecated]           ...           5 years ago
  • 0.9.2 [deprecated]           ...           5 years ago
  • 0.9.1 [deprecated]           ...           5 years ago
  • 0.9.0 [deprecated]           ...           5 years ago
  • 0.8.2 [deprecated]           ...           5 years ago
  • 0.8.1 [deprecated]           ...           5 years ago
  • 0.8.0 [deprecated]           ...           5 years ago
  • 0.7.12 [deprecated]           ...           5 years ago
  • 0.7.11 [deprecated]           ...           5 years ago
  • 0.7.10 [deprecated]           ...           5 years ago
  • 0.7.9 [deprecated]           ...           5 years ago
  • 0.7.8 [deprecated]           ...           5 years ago
  • 0.7.7 [deprecated]           ...           5 years ago
  • 0.7.6 [deprecated]           ...           5 years ago
  • 0.7.5 [deprecated]           ...           5 years ago
  • 0.7.4 [deprecated]           ...           5 years ago
  • 0.7.3 [deprecated]           ...           5 years ago
  • 0.7.2 [deprecated]           ...           5 years ago
  • 0.7.1 [deprecated]           ...           5 years ago
  • 0.7.0 [deprecated]           ...           5 years ago
  • 0.6.8 [deprecated]           ...           5 years ago
  • 0.6.7 [deprecated]           ...           5 years ago
  • 0.6.6 [deprecated]           ...           5 years ago
  • 0.6.5 [deprecated]           ...           5 years ago
  • 0.6.4 [deprecated]           ...           5 years ago
  • 0.6.3 [deprecated]           ...           5 years ago
  • 0.6.2 [deprecated]           ...           5 years ago
  • 0.6.1 [deprecated]           ...           5 years ago
  • 0.6.0 [deprecated]           ...           5 years ago
  • 0.6.0-rc9                                ...           5 years ago
  • 0.6.0-rc8                                ...           5 years ago
  • 0.6.0-rc7                                ...           5 years ago
  • 0.6.0-rc6                                ...           5 years ago
  • 0.6.0-rc5                                ...           5 years ago
  • 0.6.0-rc4                                ...           5 years ago
  • 0.6.0-rc3                                ...           5 years ago
  • 0.6.0-rc2                                ...           5 years ago
  • 0.6.0-rc1                                ...           5 years ago
  • 0.4.0 [deprecated]           ...           5 years ago
  • 0.3.7 [deprecated]           ...           5 years ago
  • 0.3.6 [deprecated]           ...           5 years ago
  • 0.3.5 [deprecated]           ...           5 years ago
  • 0.3.4 [deprecated]           ...           5 years ago
  • 0.3.3 [deprecated]           ...           5 years ago
  • 0.3.2 [deprecated]           ...           5 years ago
  • 0.3.1 [deprecated]           ...           5 years ago
  • 0.3.0 [deprecated]           ...           5 years ago
  • 0.2.4 [deprecated]           ...           5 years ago
  • 0.2.3 [deprecated]           ...           5 years ago
  • 0.2.2 [deprecated]           ...           5 years ago
  • 0.2.1 [deprecated]           ...           5 years ago
  • 0.2.0 [deprecated]           ...           5 years ago
  • 0.1.7 [deprecated]           ...           5 years ago
  • 0.1.6 [deprecated]           ...           5 years ago
  • 0.1.5 [deprecated]           ...           5 years ago
  • 0.1.4 [deprecated]           ...           5 years ago
  • 0.1.3 [deprecated]           ...           5 years ago
  • 0.1.2 [deprecated]           ...           5 years ago
  • 0.1.1 [deprecated]           ...           5 years ago
  • 0.1.0 [deprecated]           ...           5 years ago
  • 0.0.2 [deprecated]           ...           5 years ago
  • 0.0.1 [deprecated]           ...           5 years ago
  • 0.0.0 [deprecated]           ...           5 years ago
Maintainers (2)
Downloads
Today 1
This Week 2
This Month 32
Last Day 0
Last Week 11
Last Month 40
Dependencies (8)
Dev Dependencies (24)

Copyright 2014 - 2016 © taobao.org |