Deckgl example (#187) (h/t @AdriSolid)

* docs: add deckgl example

* docs: improve deckgl code example
This commit is contained in:
AdriSolid 2021-02-25 14:07:57 +01:00 committed by GitHub
parent 7622731ccf
commit 166dd68d27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,9 +143,18 @@ const pointsLayer = new MVTLayer({
pointRadiusUnits: 'pixels',
getRadius: 5,
getFillColor: [230, 0, 0]
})
});
map.addLayer(pointsLayer);
const deckgl = new DeckGL({
container: 'map',
mapStyle: 'https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json',
initialViewState: {
latitude: 0,
longitude: 0,
zoom: 1
},
layers: [pointsLayer]
});
```
## Table Sources