Skip to content

Commit

Permalink
Update README.md with changes from v1.2.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianababakanian authored and Asheem Mamoowala committed Aug 7, 2020
1 parent b63c0a4 commit 89208af
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,31 @@ Adds support for drawing and editing features on [mapbox-gl.js](https://www.mapb
npm install @mapbox/mapbox-gl-draw
```

Draw ships with CSS, make sure you include it in your build.
Draw ships with CSS, make sure you include it in your build.

**When using modules**
```js
require('@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css')
// or
import '@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css'
```

**When using CDN**
```html
<link rel='stylesheet' href='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-draw/v1.0.9/mapbox-gl-draw.css' type='text/css' />
<link rel='stylesheet' href='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-draw/v1.2.0/mapbox-gl-draw.css' type='text/css' />
```

### Usage in your application

**When using modules**

```js
var mapboxgl = require('mapbox-gl');
var MapboxDraw = require('@mapbox/mapbox-gl-draw');
import mapboxgl from 'mapbox-gl';
import MapboxDraw from "@mapbox/mapbox-gl-draw";
```

**When using a CDN**

```html
<script src='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-draw/v1.0.9/mapbox-gl-draw.js'></script>
<script src='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-draw/v1.2.0/mapbox-gl-draw.js'></script>
```

**Example setup**
Expand Down

0 comments on commit 89208af

Please sign in to comment.