Skip to content

Instantly share code, notes, and snippets.

@kristw
Last active August 16, 2020 07:33
Show Gist options
  • Save kristw/faa3148021e36063054430809e990bb2 to your computer and use it in GitHub Desktop.
Save kristw/faa3148021e36063054430809e990bb2 to your computer and use it in GitHub Desktop.
blog example: deck.gl
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