Skip to content

Instantly share code, notes, and snippets.

@Pessimistress
Last active May 24, 2018 22:03
Show Gist options
  • Save Pessimistress/b9187477c9de79297d6122c5d6283d87 to your computer and use it in GitHub Desktop.
Save Pessimistress/b9187477c9de79297d6122c5d6283d87 to your computer and use it in GitHub Desktop.
deck.gl Starter Kit
<html>
<head>
<script src="https://unpkg.com/deck.gl@~5.2.0/deckgl.min.js"></script>
<!-- only if base map is needed -->
<script src="https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.1/mapbox-gl.js"></script>
<link href="https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.1/mapbox-gl.css" rel="stylesheet" />
</head>
<body>
<div id="container" style="width: 100vw; height: 100vh;"></div>
</body>
<script type="text/javascript">
const deckgl = new deck.DeckGL({
container: 'container',
longitude: -122.45,
latitude: 37.8,
zoom: 12,
layers: [
new deck.ScatterplotLayer({
data: [
{position: [-122.45, 37.8], color: [255, 0, 0], radius: 1000}
]
}),
new deck.TextLayer({
data: [
{position: [-122.45, 37.8], text: 'Hello World'}
]
})
]
});
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment