@mapgis/mapbox-gl-draw 16.6.0 → 16.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapgis/mapbox-gl-draw",
3
- "version":"16.6.0",
3
+ "version":"16.8.5",
4
4
  "description": "A drawing component for Mapbox GL JS",
5
5
  "homepage": "https://github.com/mapbox/mapbox-gl-draw",
6
6
  "author": "mapbox",
@@ -9,7 +9,7 @@
9
9
  "browser": "dist/mapbox-gl-draw.js",
10
10
  "style": "dist/mapbox-gl-draw.css",
11
11
  "scripts": {
12
- "docs": "run docs-modes-life-cycle docs-modes-get-and-set",
12
+ "docs": "run-s docs-modes-life-cycle docs-modes-get-and-set",
13
13
  "docs-modes-get-and-set": "documentation readme --readme-file ./docs/MODES.md -s \"Setters and Getters\" src/modes/mode_interface_accessors.js --shallow",
14
14
  "docs-modes-life-cycle": "documentation readme --readme-file ./docs/MODES.md -s \"Life Cycle Functions\" src/modes/mode_interface.js --shallow",
15
15
  "test": "NODE_ENV=test npm run lint && npm run tape",
package/LICENSE DELETED
@@ -1,15 +0,0 @@
1
- Copyright (c) Mapbox
2
-
3
- All rights reserved.
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted, provided that the above
7
- copyright notice and this permission notice appear in all copies.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
- PERFORMANCE OF THIS SOFTWARE.
package/README.md DELETED
@@ -1,133 +0,0 @@
1
- # @mapbox/mapbox-gl-draw
2
-
3
- [![Build Status](https://travis-ci.org/mapbox/mapbox-gl-draw.svg?branch=main)](https://travis-ci.org/mapbox/mapbox-gl-draw)
4
-
5
- Adds support for drawing and editing features on [mapbox-gl.js](https://www.mapbox.com/mapbox-gl-js/) maps. [See a live example here](https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/)
6
-
7
- **Requires [mapbox-gl-js](https://github.com/mapbox/mapbox-gl-js).**
8
-
9
- ### Installing
10
-
11
- ```
12
- npm install @mapbox/mapbox-gl-draw
13
- ```
14
-
15
- Draw ships with CSS, make sure you include it in your build.
16
-
17
- ### Usage in your application
18
-
19
- #### JavaScript
20
-
21
- **When using modules**
22
-
23
- ```js
24
- import mapboxgl from 'mapbox-gl';
25
- import MapboxDraw from "@mapbox/mapbox-gl-draw";
26
- ```
27
-
28
- **When using a CDN**
29
-
30
- ```html
31
- <script src='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-draw/v1.3.0/mapbox-gl-draw.js'></script>
32
- ```
33
-
34
- #### CSS
35
-
36
- **When using modules**
37
- ```js
38
- import '@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css'
39
- ```
40
-
41
- **When using CDN**
42
- ```html
43
- <link rel='stylesheet' href='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-draw/v1.3.0/mapbox-gl-draw.css' type='text/css' />
44
- ```
45
-
46
- ### Typescript
47
-
48
- Typescript definition files are available as part of the [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mapbox__mapbox-gl-draw) package.
49
-
50
- ```
51
- npm install @types/mapbox__mapbox-gl-draw
52
- ```
53
-
54
- ### Example usage
55
-
56
- ```js
57
- mapboxgl.accessToken = 'YOUR_ACCESS_TOKEN';
58
-
59
- var map = new mapboxgl.Map({
60
- container: 'map',
61
- style: 'mapbox://styles/mapbox/streets-v11',
62
- center: [40, -74.50],
63
- zoom: 9
64
- });
65
-
66
- var Draw = new MapboxDraw();
67
-
68
- // Map#addControl takes an optional second argument to set the position of the control.
69
- // If no position is specified the control defaults to `top-right`. See the docs
70
- // for more details: https://docs.mapbox.com/mapbox-gl-js/api/#map#addcontrol
71
-
72
- map.addControl(Draw, 'top-left');
73
-
74
- map.on('load', function() {
75
- // ALL YOUR APPLICATION CODE
76
- });
77
- ```
78
-
79
- https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/
80
-
81
- ### See [API.md](https://github.com/mapbox/mapbox-gl-draw/blob/main/docs/API.md) for complete reference.
82
-
83
- ### Enhancements and New Interactions
84
-
85
- For additional functionality [check out our list of custom modes](https://github.com/mapbox/mapbox-gl-draw/blob/main/docs/MODES.md#available-custom-modes).
86
-
87
- Mapbox Draw accepts functionality changes after the functionality has been proven out via a [custom mode](https://github.com/mapbox/mapbox-gl-draw/blob/main/docs/MODES.md#creating-modes-for-mapbox-draw). This lets users experiment and validate their mode before entering a review process, hopefully promoting innovation. When you write a custom mode, please open a PR adding it to our [list of custom modes](https://github.com/mapbox/mapbox-gl-draw/blob/main/docs/MODES.md#available-custom-modes).
88
-
89
- ### Developing and testing
90
-
91
- Install dependencies, build the source files and crank up a server via:
92
-
93
- ```
94
- git clone git@github.com:mapbox/mapbox-gl-draw.git
95
- yarn install
96
- yarn start & open "http://localhost:9967/debug/?access_token=<token>"
97
- ```
98
-
99
- ### Testing
100
-
101
- ```
102
- npm run test
103
- ```
104
-
105
- ### Publishing
106
-
107
- To GitHub and NPM:
108
-
109
- ```
110
- npm version (major|minor|patch)
111
- git push --tags
112
- git push
113
- npm publish
114
- ```
115
-
116
- To CDN:
117
-
118
- ```
119
- # make sure you are authenticated for AWS
120
- git checkout v{x.y.z}
121
- yarn install
122
- yarn run prepublish
123
- aws s3 cp --recursive --acl public-read dist s3://mapbox-gl-js/plugins/mapbox-gl-draw/v{x.y.z}
124
- ```
125
-
126
- Update the version number in [the GL JS example](https://github.com/mapbox/mapbox-gl-js/blob/publisher-production/docs/pages/example/mapbox-gl-draw.html).
127
-
128
- ### Naming actions
129
-
130
- We're trying to follow standards when naming things. Here is a collection of links where we look for inspiration.
131
-
132
- - https://turfjs.org
133
- - https://shapely.readthedocs.io/en/latest/manual.html