Last active
August 7, 2021 16:24
-
-
Save markgis/7293161f651e7f007284c4be2954a2bb to your computer and use it in GitHub Desktop.
basic-map-final
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
<script src='https://api.mapbox.com/mapbox-gl-js/v1.9.0/mapbox-gl.js'></script> | |
<link href='https://api.mapbox.com/mapbox-gl-js/v1.9.0/mapbox-gl.css' rel='stylesheet' /> | |
<style> | |
#map { | |
position: absolute; | |
top: 0; | |
bottom: 0; | |
width: 100%; | |
} | |
</style> | |
<body> | |
<div id='map'></div> <script> | |
var map = new mapboxgl.Map({ | |
container: 'map', | |
style:{ | |
'version': 8, | |
'sources': { | |
'raster-tiles': { | |
'type': 'raster', | |
'tiles': [ | |
'https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.jpg' | |
], | |
'tileSize': 256, | |
} | |
}, | |
'layers': [{ | |
'id': 'simple-tiles', | |
'type': 'raster', | |
'source': 'raster-tiles', | |
'minzoom': 0, | |
'maxzoom': 22 | |
}] | |
}, | |
center: [-0.099197496, 51.501657], | |
zoom: 14 | |
}); | |
</script> | |
</body> |
changed to your style, but still continues to request a token
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
<div id='map' </div> <script>
replace with
<div id='map'></div> <script>