Last active
August 16, 2020 07:33
-
-
Save kristw/faa3148021e36063054430809e990bb2 to your computer and use it in GitHub Desktop.
blog example: deck.gl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Deck} from '@deck.gl/core'; | |
import {ScatterplotLayer} from '@deck.gl/layers'; | |
const INITIAL_VIEW_STATE = { | |
latitude: 37.8, | |
longitude: -122.45, | |
zoom: 15 | |
}; | |
const deckgl = new Deck({ | |
initialViewState: INITIAL_VIEW_STATE, | |
controller: true, | |
layers: [ | |
new ScatterplotLayer({ | |
data: [ | |
{position: [-122.45, 37.8], color: [255, 0, 0], radius: 100} | |
], | |
getColor: d => d.color, | |
getRadius: d => d.radius | |
}) | |
] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment