Skip to content

Instantly share code, notes, and snippets.

@tyrasd
Forked from anonymous/index.html
Created April 12, 2017 19:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tyrasd/4242194ccfc1c57562944733d10cbf66 to your computer and use it in GitHub Desktop.
Save tyrasd/4242194ccfc1c57562944733d10cbf66 to your computer and use it in GitHub Desktop.
Empty Style
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Empty Style Preview</title>
<link rel="stylesheet" type="text/css" href="https://api.mapbox.com/mapbox-gl-js/v0.28.0/mapbox-gl.css" />
<script src="https://api.mapbox.com/mapbox-gl-js/v0.28.0/mapbox-gl.js"></script>
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
<body>
<div id='map'></div>
<script>
var map = new mapboxgl.Map({
container: 'map',
style: 'style.json',
attributionControl: true,
hash: true
});
map.addControl(new mapboxgl.NavigationControl());
</script>
</body>
</html>
{
"version": 8,
"name": "Empty Style",
"metadata": {
"mapbox:autocomposite": false,
"mapbox:type": "template",
"maputnik:renderer": "mbgljs",
"openmaptiles:version": "3.x"
},
"sources": {
"tms": {
"type": "raster",
"tiles": [
"https://s3-eu-west-1.amazonaws.com/osm-node-density/2016/{z}/{x}/{y}.png"
],
"minzoom": 0,
"maxzoom": 7,
"tileSize": 256
}
},
"glyphs": "https://demo.tileserver.org/fonts/{fontstack}/{range}.pbf",
"layers": [
{
"id": "asd",
"type": "raster",
"source": "tms",
"maxzoom": 18
}
],
"sprites": "https://demo.tileserver.org/fonts/{fontstack}/{range}.pbf",
"id": "tkj2od2gi"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment