forked from visgl/deck.gl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
526e0d5
commit 9ef477a
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<html> | ||
<head> | ||
<!-- deck.gl standalone bundle --> | ||
<script src="https://unpkg.com/deck.gl@~5.2.0/deckgl.min.js"></script> | ||
|
||
<!-- Mapbox dependencies: 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" /> | ||
|
||
<style type="text/css"> | ||
body {margin: 0; padding: 0;} | ||
#container {width: 100vw; height: 100vh;} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div id="container"></div> | ||
</body> | ||
|
||
<script type="text/javascript"> | ||
const deckgl = new deck.DeckGL({ | ||
container: 'container', | ||
mapboxAccessToken: '<your-mapbox-token>', | ||
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> |