generated from ajduberstein/pydeck_custom_layer
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
34 lines (32 loc) · 1.03 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<html>
<head>
<script src="https://unpkg.com/deck.gl@^8.1.0/dist.min.js"></script>
<script src="https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.1/mapbox-gl.js"></script>
<style type="text/css">
body {margin: 0; padding: 0;}
#container {width: 100vw; height: 100vh;}
</style>
<link href="https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.1/mapbox-gl.css" rel="stylesheet" />
<script src="./dist/bundle.js"></script>
</head>
<body>
<div id="container"></div>
</body>
<script>
const layer = new MyTileLayerLibrary.MyTileLayer({
data: 'https://c.tile.openstreetmap.org/{z}/{x}/{y}.png',
});
const deckgl = new deck.DeckGL({
mapboxApiAccessToken: '<your_token_here>',
container: 'container',
mapStyle: 'mapbox://styles/mapbox/light-v9',
initialViewState: {
longitude: 6.6667,
latitude: 46.5333,
zoom: 5,
},
controller: true
});
deckgl.setProps({layers: [layer]});
</script>
</html>