Skip to content

Commit

Permalink
added info about gl._glMap access
Browse files Browse the repository at this point in the history
  • Loading branch information
fnicollet committed Apr 22, 2017
1 parent 4472b22 commit 4ae6784
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ var gl = L.mapboxGL({
accessToken: 'no-token'
}).addTo(map);
```
Once you have created the leaflet layer, the mapbox-gl map object can be accessed using
```javascript
gl._glMap...
// add a source to the mapbox-gl layer
gl._glMap.addSource({...})
```

## Get your Mapbox token
Create a mapbox account, then head to [https://www.mapbox.com/studio/](https://www.mapbox.com/studio/) and copy your access token that was automatically created for you. The access token should start with "pk.".
Expand Down

0 comments on commit 4ae6784

Please sign in to comment.