Skip to content

Instantly share code, notes, and snippets.

Created April 12, 2017 19:06
Show Gist options
  • Save anonymous/9196c0270cf8ea0c4c26c1451c2972e7 to your computer and use it in GitHub Desktop.
Save anonymous/9196c0270cf8ea0c4c26c1451c2972e7 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
}
},
"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