Skip to content

Instantly share code, notes, and snippets.

@klokan
Created August 14, 2017 16:27
Show Gist options
  • Save klokan/26d012e33be41a241fd08dee3f7cae7a to your computer and use it in GitHub Desktop.
Save klokan/26d012e33be41a241fd08dee3f7cae7a to your computer and use it in GitHub Desktop.
OpenMapTiles Satellite Hybrid
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>OpenMapTiles Satellite Hybrid</title>
<link rel="stylesheet" type="text/css" href="https://api.mapbox.com/mapbox-gl-js/v0.39.1/mapbox-gl.css" />
<script src="https://api.mapbox.com/mapbox-gl-js/v0.39.1/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:
{
"version": 8,
"name": "OpenMapTiles Satellite Hybrid",
"metadata": {
"mapbox:autocomposite": false,
"mapbox:type": "template",
"maputnik:renderer": "mbgljs",
"openmaptiles:version": "3.x"
},
"center": [
14.4215,
50.0876
],
"zoom": 2,
"bearing": 0,
"pitch": 0,
"sources": {
"openmaptiles": {
"type": "vector",
"url": "https://free.tilehosting.com/data/v3.json?key=NZLDFYl5VaViagsQRgLE"
},
"satellite-lowres": {
"type": "raster",
"url": "https://temporary.tilehosting.com/satellite-lowres.json",
"tileSize": 256 / window.devicePixelRatio
},
"satellite-mediumres": {
"type": "raster",
"url": "https://temporary.tilehosting.com/satellite-mediumres.json",
"tileSize": 256 / window.devicePixelRatio
},
"satellite-highres": {
"type": "raster",
"url": "https://temporary.tilehosting.com/satellite-highres-prague.json",
"tileSize": 256 / window.devicePixelRatio
}
},
"glyphs": "https://free.tilehosting.com/fonts/{fontstack}/{range}.pbf?key=NZLDFYl5VaViagsQRgLE",
"layers": [
{
"id": "background",
"type": "background",
"layout": {
"visibility": "none"
},
"paint": {
"background-color": "#0C1C2B"
}
},
{
"id": "satellite-lowres",
"type": "raster",
"source": "satellite-lowres",
"minzoom": 0,
"maxzoom": 22,
"filter": [
"all"
],
"layout": {
"visibility": "visible"
},
"paint": {
"raster-opacity": 1
}
},
{
"id": "satellite-mediumres",
"type": "raster",
"source": "satellite-mediumres",
"minzoom": 5,
"maxzoom": 22,
"layout": {},
"paint": {
"raster-opacity": {
"stops": [
[
5,
0
],
[
6,
1
]
]
}
}
},
{
"id": "satellite-highres",
"type": "raster",
"source": "satellite-highres",
"minzoom": 12,
"maxzoom": 22,
"layout": {},
"paint": {
"raster-opacity": {
"stops": [
[
12,
0
],
[
13,
1
]
]
}
}
},
{
"id": "water",
"type": "fill",
"source": "openmaptiles",
"source-layer": "water",
"filter": [
"==",
"$type",
"Polygon"
],
"layout": {
"visibility": "none"
},
"paint": {
"fill-color": "hsl(205, 56%, 73%)"
}
},
{
"id": "landuse",
"type": "fill",
"source": "openmaptiles",
"source-layer": "landuse",
"filter": [
"==",
"class",
"agriculture"
],
"layout": {
"visibility": "visible"
},
"paint": {
"fill-color": "#eae0d0"
}
},
{
"id": "landuse_overlay_national_park",
"type": "fill",
"source": "openmaptiles",
"source-layer": "landcover",
"filter": [
"==",
"class",
"national_park"
],
"paint": {
"fill-color": "#E1EBB0",
"fill-opacity": {
"base": 1,
"stops": [
[
5,
0
],
[
9,
0.75
]
]
}
}
},
{
"id": "park_outline",
"type": "line",
"source": "openmaptiles",
"source-layer": "park",
"layout": {
"visibility": "none"
},
"paint": {
"line-color": "rgba(159, 183, 118, 0.69)",
"line-dasharray": [
0.5,
1
]
}
},
{
"id": "road_path",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"in",
"class",
"path",
"track"
]
],
"layout": {
"line-cap": "square",
"line-join": "bevel"
},
"paint": {
"line-color": "rgba(247, 247, 247, 0.33)",
"line-dasharray": [
1,
1
],
"line-width": {
"base": 1.55,
"stops": [
[
7,
0.25
],
[
20,
4
]
]
}
}
},
{
"id": "road_minor",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"in",
"class",
"minor",
"service"
]
],
"layout": {
"line-cap": "butt",
"line-join": "round"
},
"paint": {
"line-color": "rgba(247, 247, 247, 0.12)",
"line-width": {
"base": 1.55,
"stops": [
[
4,
0.25
],
[
20,
10
]
]
}
}
},
{
"id": "tunnel_minor",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"==",
"brunnel",
"tunnel"
],
[
"==",
"class",
"minor_road"
]
],
"layout": {
"line-cap": "butt",
"line-join": "miter"
},
"paint": {
"line-color": "rgba(239, 239, 239, 0.2)",
"line-width": {
"base": 1.55,
"stops": [
[
4,
0.25
],
[
20,
30
]
]
},
"line-dasharray": [
0.36,
0.18
]
}
},
{
"id": "tunnel_major",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"==",
"brunnel",
"tunnel"
],
[
"in",
"class",
"primary",
"secondary",
"tertiary",
"trunk"
]
],
"layout": {
"line-cap": "butt",
"line-join": "miter"
},
"paint": {
"line-color": "rgba(255, 255, 255, 0.2)",
"line-width": {
"base": 1.4,
"stops": [
[
6,
0.5
],
[
20,
30
]
]
},
"line-dasharray": [
0.28,
0.14
]
}
},
{
"id": "road_trunk_primary",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"minzoom": 8,
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"in",
"class",
"trunk",
"primary"
]
],
"layout": {
"line-cap": "round",
"line-join": "round"
},
"paint": {
"line-color": "rgba(255, 255, 255, 0.3)",
"line-width": {
"base": 1.4,
"stops": [
[
8,
0.5
],
[
20,
10
]
]
}
}
},
{
"id": "road_secondary_tertiary",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"minzoom": 9,
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"in",
"class",
"secondary",
"tertiary"
]
],
"layout": {
"line-cap": "butt",
"line-join": "round"
},
"paint": {
"line-color": "rgba(255, 255, 255, 0.3)",
"line-width": {
"base": 1.4,
"stops": [
[
6,
0.5
],
[
20,
6
]
]
}
}
},
{
"id": "road_major_motorway",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"minzoom": 6,
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"==",
"class",
"motorway"
]
],
"layout": {
"line-cap": "butt",
"line-join": "round"
},
"paint": {
"line-color": "rgba(255, 255, 255, 0.2)",
"line-width": {
"base": 1.4,
"stops": [
[
10,
1
],
[
16,
6
]
]
},
"line-offset": 0
}
},
{
"id": "railway",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"filter": [
"==",
"class",
"rail"
],
"layout": {
"visibility": "visible"
},
"paint": {
"line-color": "rgba(179, 170, 158, 0.2)",
"line-opacity": {
"base": 1,
"stops": [
[
11,
0
],
[
16,
1
]
]
}
}
},
{
"id": "bridge_minor case",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"==",
"brunnel",
"bridge"
],
[
"==",
"class",
"minor_road"
]
],
"layout": {
"line-cap": "butt",
"line-join": "miter",
"visibility": "none"
},
"paint": {
"line-color": "rgba(222, 222, 222, 0.2)",
"line-width": {
"base": 1.6,
"stops": [
[
12,
0.5
],
[
20,
10
]
]
},
"line-gap-width": {
"base": 1.55,
"stops": [
[
4,
0.25
],
[
20,
30
]
]
}
}
},
{
"id": "bridge_major case",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"==",
"brunnel",
"bridge"
],
[
"in",
"class",
"primary",
"secondary",
"tertiary",
"trunk"
]
],
"layout": {
"line-cap": "butt",
"line-join": "miter",
"visibility": "none"
},
"paint": {
"line-color": "rgba(222, 222, 222, 0.2)",
"line-width": {
"base": 1.6,
"stops": [
[
12,
0.5
],
[
20,
10
]
]
},
"line-gap-width": {
"base": 1.55,
"stops": [
[
4,
0.25
],
[
20,
30
]
]
}
}
},
{
"id": "bridge_minor",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"==",
"brunnel",
"bridge"
],
[
"==",
"class",
"minor_road"
]
],
"layout": {
"line-cap": "round",
"line-join": "round",
"visibility": "none"
},
"paint": {
"line-color": "rgba(239, 239, 239, 0.2)",
"line-width": {
"base": 1.55,
"stops": [
[
4,
0.25
],
[
20,
30
]
]
}
}
},
{
"id": "bridge_major",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"==",
"brunnel",
"bridge"
],
[
"in",
"class",
"primary",
"secondary",
"tertiary",
"trunk"
]
],
"layout": {
"line-cap": "round",
"line-join": "round",
"visibility": "none"
},
"paint": {
"line-color": "rgba(255, 255, 255, 0.2)",
"line-width": {
"base": 1.4,
"stops": [
[
6,
0.5
],
[
20,
30
]
]
}
}
},
{
"id": "admin_sub",
"type": "line",
"source": "openmaptiles",
"source-layer": "boundary",
"filter": [
"in",
"admin_level",
4,
6,
8
],
"layout": {
"visibility": "visible"
},
"paint": {
"line-color": "rgba(194, 194, 194, 0.5)",
"line-dasharray": [
2,
1
]
}
},
{
"id": "admin_country-dark",
"type": "line",
"source": "openmaptiles",
"source-layer": "boundary",
"minzoom": 0,
"filter": [
"all",
[
"<=",
"admin_level",
2
],
[
"==",
"$type",
"LineString"
]
],
"layout": {
"line-cap": "butt",
"line-join": "round"
},
"paint": {
"line-color": "rgba(0, 0, 0, 0.51)",
"line-width": {
"base": 1.3,
"stops": [
[
3,
0.5
],
[
22,
15
]
]
},
"line-offset": 1
}
},
{
"id": "admin_country",
"type": "line",
"source": "openmaptiles",
"source-layer": "boundary",
"filter": [
"all",
[
"<=",
"admin_level",
2
],
[
"==",
"$type",
"LineString"
]
],
"layout": {
"line-cap": "round",
"line-join": "round"
},
"paint": {
"line-color": "rgba(226, 226, 226, 1)",
"line-width": {
"base": 1.3,
"stops": [
[
3,
0.5
],
[
22,
15
]
]
}
}
},
{
"id": "poi_label",
"type": "symbol",
"source": "openmaptiles",
"source-layer": "poi",
"minzoom": 5,
"filter": [
"all",
[
"==",
"$type",
"Point"
],
[
"==",
"rank",
1
]
],
"layout": {
"text-size": 11,
"text-font": [
"Klokantech Noto Sans Italic",
"Klokantech Noto Sans CJK Regular"
],
"visibility": "visible",
"text-offset": [
0,
0.5
],
"icon-size": 1,
"text-anchor": "top",
"text-field": "{name_en}",
"text-max-width": 8
},
"paint": {
"text-color": "rgba(255, 255, 255, 1)",
"text-halo-width": 1,
"text-halo-color": "rgba(0, 0, 0, 0.75)",
"text-halo-blur": 1
}
},
{
"id": "road_major_label",
"type": "symbol",
"source": "openmaptiles",
"source-layer": "transportation_name",
"filter": [
"==",
"$type",
"LineString"
],
"layout": {
"symbol-placement": "line",
"text-field": "{name_en}",
"text-font": [
"Klokantech Noto Sans Regular",
"Klokantech Noto Sans CJK Regular"
],
"text-transform": "none",
"text-letter-spacing": 0.1,
"text-size": {
"base": 1.4,
"stops": [
[
10,
8
],
[
20,
14
]
]
},
"text-rotation-alignment": "map"
},
"paint": {
"text-color": "rgba(255, 255, 255, 1)",
"text-halo-color": "rgba(43, 43, 43, 1)",
"text-halo-width": 1
}
},
{
"id": "place_label_other",
"type": "symbol",
"source": "openmaptiles",
"source-layer": "place",
"minzoom": 8,
"filter": [
"all",
[
"==",
"$type",
"Point"
],
[
"!=",
"class",
"city"
]
],
"layout": {
"text-field": "{name_en}",
"text-font": [
"Klokantech Noto Sans Regular",
"Klokantech Noto Sans CJK Regular"
],
"text-max-width": 6,
"text-size": {
"stops": [
[
6,
10
],
[
12,
14
]
]
},
"visibility": "visible",
"text-anchor": "center"
},
"paint": {
"text-color": "rgba(255, 255, 255, 1)",
"text-halo-color": "rgba(43, 43, 43, 1)",
"text-halo-blur": 0.5,
"text-halo-width": 1
}
},
{
"id": "place_label_city",
"type": "symbol",
"source": "openmaptiles",
"source-layer": "place",
"maxzoom": 16,
"filter": [
"all",
[
"==",
"$type",
"Point"
],
[
"==",
"class",
"city"
]
],
"layout": {
"text-field": "{name_en}",
"text-font": [
"Klokantech Noto Sans Regular",
"Klokantech Noto Sans CJK Regular"
],
"text-max-width": 10,
"text-size": {
"stops": [
[
3,
12
],
[
8,
16
],
[
10,
20
]
]
}
},
"paint": {
"text-color": "rgba(255, 255, 255, 1)",
"text-halo-color": "rgba(0, 0, 0, 0.75)",
"text-halo-blur": 0.5,
"text-halo-width": 1
}
},
{
"id": "country_label",
"type": "symbol",
"source": "openmaptiles",
"source-layer": "place",
"maxzoom": 12,
"filter": [
"all",
[
"==",
"$type",
"Point"
],
[
"==",
"class",
"country"
]
],
"layout": {
"text-field": "{name_en}",
"text-font": [
"Klokantech Noto Sans Bold",
"Klokantech Noto Sans CJK Bold"
],
"text-max-width": 10,
"text-size": {
"stops": [
[
3,
12
],
[
8,
22
]
]
}
},
"paint": {
"text-color": "rgba(255, 255, 255, 1)",
"text-halo-color": "rgba(0, 0, 0, 1)",
"text-halo-width": 1,
"text-halo-blur": 1
}
}
],
"id": "ciwf4zbsv007y2pmt2rspc1dc"
},
attributionControl: true,
hash: true
});
map.addControl(new mapboxgl.NavigationControl());
</script>
<script id="jsbin-source-html" type="text/html"> <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>OpenMapTiles Satellite Hybrid BETA</title>
<link rel="stylesheet" type="text/css" href="https://api.mapbox.com/mapbox-gl-js/v0.33.0/mapbox-gl.css" />
<script src="https://api.mapbox.com/mapbox-gl-js/v0.33.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:
{
"version": 8,
"name": "Klokantech Basic",
"metadata": {
"mapbox:autocomposite": false,
"mapbox:type": "template",
"maputnik:renderer": "mbgljs",
"openmaptiles:version": "3.x",
"openmaptiles:mapbox:owner": "openmaptiles",
"openmaptiles:mapbox:source:url": "mapbox://openmaptiles.4qljc88t"
},
"center": [
14.4215,
50.0876
],
"zoom": 2,
"bearing": 0,
"pitch": 0,
"sources": {
"openmaptiles": {
"type": "vector",
"url": "https://free.tilehosting.com/data/v3.json?key=NZLDFYl5VaViagsQRgLE"
},
"satellite-lowres": {
"type": "raster",
"url": "https://temporary.tilehosting.com/satellite-lowres.json",
"tileSize": 256 / window.devicePixelRatio
},
"satellite-mediumres": {
"type": "raster",
"url": "https://temporary.tilehosting.com/satellite-mediumres.json",
"tileSize": 256 / window.devicePixelRatio
},
"satellite-highres": {
"type": "raster",
"url": "https://temporary.tilehosting.com/satellite-highres-prague.json",
"tileSize": 256 / window.devicePixelRatio
}
},
"glyphs": "https://free.tilehosting.com/fonts/{fontstack}/{range}.pbf?key=NZLDFYl5VaViagsQRgLE",
"layers": [
{
"id": "background",
"type": "background",
"layout": {
"visibility": "none"
},
"paint": {
"background-color": "#0C1C2B"
}
},
{
"id": "satellite-lowres",
"type": "raster",
"source": "satellite-lowres",
"minzoom": 0,
"maxzoom": 22,
"filter": [
"all"
],
"layout": {
"visibility": "visible"
},
"paint": {
"raster-opacity": 1
}
},
{
"id": "satellite-mediumres",
"type": "raster",
"source": "satellite-mediumres",
"minzoom": 5,
"maxzoom": 22,
"layout": {},
"paint": {
"raster-opacity": {
"stops": [
[
5,
0
],
[
6,
1
]
]
}
}
},
{
"id": "satellite-highres",
"type": "raster",
"source": "satellite-highres",
"minzoom": 12,
"maxzoom": 22,
"layout": {},
"paint": {
"raster-opacity": {
"stops": [
[
12,
0
],
[
13,
1
]
]
}
}
},
{
"id": "water",
"type": "fill",
"source": "openmaptiles",
"source-layer": "water",
"filter": [
"==",
"$type",
"Polygon"
],
"layout": {
"visibility": "none"
},
"paint": {
"fill-color": "hsl(205, 56%, 73%)"
}
},
{
"id": "landuse",
"type": "fill",
"source": "openmaptiles",
"source-layer": "landuse",
"filter": [
"==",
"class",
"agriculture"
],
"layout": {
"visibility": "visible"
},
"paint": {
"fill-color": "#eae0d0"
}
},
{
"id": "landuse_overlay_national_park",
"type": "fill",
"source": "openmaptiles",
"source-layer": "landcover",
"filter": [
"==",
"class",
"national_park"
],
"paint": {
"fill-color": "#E1EBB0",
"fill-opacity": {
"base": 1,
"stops": [
[
5,
0
],
[
9,
0.75
]
]
}
}
},
{
"id": "park_outline",
"type": "line",
"source": "openmaptiles",
"source-layer": "park",
"layout": {
"visibility": "none"
},
"paint": {
"line-color": "rgba(159, 183, 118, 0.69)",
"line-dasharray": [
0.5,
1
]
}
},
{
"id": "road_path",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"in",
"class",
"path",
"track"
]
],
"layout": {
"line-cap": "square",
"line-join": "bevel"
},
"paint": {
"line-color": "rgba(247, 247, 247, 0.33)",
"line-dasharray": [
1,
1
],
"line-width": {
"base": 1.55,
"stops": [
[
7,
0.25
],
[
20,
4
]
]
}
}
},
{
"id": "road_minor",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"in",
"class",
"minor",
"service"
]
],
"layout": {
"line-cap": "butt",
"line-join": "round"
},
"paint": {
"line-color": "rgba(247, 247, 247, 0.12)",
"line-width": {
"base": 1.55,
"stops": [
[
4,
0.25
],
[
20,
10
]
]
}
}
},
{
"id": "tunnel_minor",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"==",
"brunnel",
"tunnel"
],
[
"==",
"class",
"minor_road"
]
],
"layout": {
"line-cap": "butt",
"line-join": "miter"
},
"paint": {
"line-color": "rgba(239, 239, 239, 0.2)",
"line-width": {
"base": 1.55,
"stops": [
[
4,
0.25
],
[
20,
30
]
]
},
"line-dasharray": [
0.36,
0.18
]
}
},
{
"id": "tunnel_major",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"==",
"brunnel",
"tunnel"
],
[
"in",
"class",
"primary",
"secondary",
"tertiary",
"trunk"
]
],
"layout": {
"line-cap": "butt",
"line-join": "miter"
},
"paint": {
"line-color": "rgba(255, 255, 255, 0.2)",
"line-width": {
"base": 1.4,
"stops": [
[
6,
0.5
],
[
20,
30
]
]
},
"line-dasharray": [
0.28,
0.14
]
}
},
{
"id": "road_trunk_primary",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"minzoom": 8,
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"in",
"class",
"trunk",
"primary"
]
],
"layout": {
"line-cap": "round",
"line-join": "round"
},
"paint": {
"line-color": "rgba(255, 255, 255, 0.3)",
"line-width": {
"base": 1.4,
"stops": [
[
8,
0.5
],
[
20,
10
]
]
}
}
},
{
"id": "road_secondary_tertiary",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"minzoom": 9,
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"in",
"class",
"secondary",
"tertiary"
]
],
"layout": {
"line-cap": "butt",
"line-join": "round"
},
"paint": {
"line-color": "rgba(255, 255, 255, 0.3)",
"line-width": {
"base": 1.4,
"stops": [
[
6,
0.5
],
[
20,
6
]
]
}
}
},
{
"id": "road_major_motorway",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"minzoom": 6,
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"==",
"class",
"motorway"
]
],
"layout": {
"line-cap": "butt",
"line-join": "round"
},
"paint": {
"line-color": "rgba(255, 255, 255, 0.2)",
"line-width": {
"base": 1.4,
"stops": [
[
10,
1
],
[
16,
6
]
]
},
"line-offset": 0
}
},
{
"id": "railway",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"filter": [
"==",
"class",
"rail"
],
"layout": {
"visibility": "visible"
},
"paint": {
"line-color": "rgba(179, 170, 158, 0.2)",
"line-opacity": {
"base": 1,
"stops": [
[
11,
0
],
[
16,
1
]
]
}
}
},
{
"id": "bridge_minor case",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"==",
"brunnel",
"bridge"
],
[
"==",
"class",
"minor_road"
]
],
"layout": {
"line-cap": "butt",
"line-join": "miter",
"visibility": "none"
},
"paint": {
"line-color": "rgba(222, 222, 222, 0.2)",
"line-width": {
"base": 1.6,
"stops": [
[
12,
0.5
],
[
20,
10
]
]
},
"line-gap-width": {
"base": 1.55,
"stops": [
[
4,
0.25
],
[
20,
30
]
]
}
}
},
{
"id": "bridge_major case",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"==",
"brunnel",
"bridge"
],
[
"in",
"class",
"primary",
"secondary",
"tertiary",
"trunk"
]
],
"layout": {
"line-cap": "butt",
"line-join": "miter",
"visibility": "none"
},
"paint": {
"line-color": "rgba(222, 222, 222, 0.2)",
"line-width": {
"base": 1.6,
"stops": [
[
12,
0.5
],
[
20,
10
]
]
},
"line-gap-width": {
"base": 1.55,
"stops": [
[
4,
0.25
],
[
20,
30
]
]
}
}
},
{
"id": "bridge_minor",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"==",
"brunnel",
"bridge"
],
[
"==",
"class",
"minor_road"
]
],
"layout": {
"line-cap": "round",
"line-join": "round",
"visibility": "none"
},
"paint": {
"line-color": "rgba(239, 239, 239, 0.2)",
"line-width": {
"base": 1.55,
"stops": [
[
4,
0.25
],
[
20,
30
]
]
}
}
},
{
"id": "bridge_major",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"==",
"brunnel",
"bridge"
],
[
"in",
"class",
"primary",
"secondary",
"tertiary",
"trunk"
]
],
"layout": {
"line-cap": "round",
"line-join": "round",
"visibility": "none"
},
"paint": {
"line-color": "rgba(255, 255, 255, 0.2)",
"line-width": {
"base": 1.4,
"stops": [
[
6,
0.5
],
[
20,
30
]
]
}
}
},
{
"id": "admin_sub",
"type": "line",
"source": "openmaptiles",
"source-layer": "boundary",
"filter": [
"in",
"admin_level",
4,
6,
8
],
"layout": {
"visibility": "visible"
},
"paint": {
"line-color": "rgba(194, 194, 194, 0.5)",
"line-dasharray": [
2,
1
]
}
},
{
"id": "admin_country-dark",
"type": "line",
"source": "openmaptiles",
"source-layer": "boundary",
"minzoom": 0,
"filter": [
"all",
[
"<=",
"admin_level",
2
],
[
"==",
"$type",
"LineString"
]
],
"layout": {
"line-cap": "butt",
"line-join": "round"
},
"paint": {
"line-color": "rgba(0, 0, 0, 0.51)",
"line-width": {
"base": 1.3,
"stops": [
[
3,
0.5
],
[
22,
15
]
]
},
"line-offset": 1
}
},
{
"id": "admin_country",
"type": "line",
"source": "openmaptiles",
"source-layer": "boundary",
"filter": [
"all",
[
"<=",
"admin_level",
2
],
[
"==",
"$type",
"LineString"
]
],
"layout": {
"line-cap": "round",
"line-join": "round"
},
"paint": {
"line-color": "rgba(226, 226, 226, 1)",
"line-width": {
"base": 1.3,
"stops": [
[
3,
0.5
],
[
22,
15
]
]
}
}
},
{
"id": "poi_label",
"type": "symbol",
"source": "openmaptiles",
"source-layer": "poi",
"minzoom": 5,
"filter": [
"all",
[
"==",
"$type",
"Point"
],
[
"==",
"rank",
1
]
],
"layout": {
"text-size": 11,
"text-font": [
"Klokantech Noto Sans Italic",
"Klokantech Noto Sans CJK Regular"
],
"visibility": "visible",
"text-offset": [
0,
0.5
],
"icon-size": 1,
"text-anchor": "top",
"text-field": "{name_en}",
"text-max-width": 8
},
"paint": {
"text-color": "rgba(255, 255, 255, 1)",
"text-halo-width": 1,
"text-halo-color": "rgba(0, 0, 0, 0.75)",
"text-halo-blur": 1
}
},
{
"id": "road_major_label",
"type": "symbol",
"source": "openmaptiles",
"source-layer": "transportation_name",
"filter": [
"==",
"$type",
"LineString"
],
"layout": {
"symbol-placement": "line",
"text-field": "{name_en}",
"text-font": [
"Klokantech Noto Sans Regular",
"Klokantech Noto Sans CJK Regular"
],
"text-transform": "none",
"text-letter-spacing": 0.1,
"text-size": {
"base": 1.4,
"stops": [
[
10,
8
],
[
20,
14
]
]
},
"text-rotation-alignment": "map"
},
"paint": {
"text-color": "rgba(255, 255, 255, 1)",
"text-halo-color": "rgba(43, 43, 43, 1)",
"text-halo-width": 1
}
},
{
"id": "place_label_other",
"type": "symbol",
"source": "openmaptiles",
"source-layer": "place",
"minzoom": 8,
"filter": [
"all",
[
"==",
"$type",
"Point"
],
[
"!=",
"class",
"city"
]
],
"layout": {
"text-field": "{name_en}",
"text-font": [
"Klokantech Noto Sans Regular",
"Klokantech Noto Sans CJK Regular"
],
"text-max-width": 6,
"text-size": {
"stops": [
[
6,
10
],
[
12,
14
]
]
},
"visibility": "visible",
"text-anchor": "center"
},
"paint": {
"text-color": "rgba(255, 255, 255, 1)",
"text-halo-color": "rgba(43, 43, 43, 1)",
"text-halo-blur": 0.5,
"text-halo-width": 1
}
},
{
"id": "place_label_city",
"type": "symbol",
"source": "openmaptiles",
"source-layer": "place",
"maxzoom": 16,
"filter": [
"all",
[
"==",
"$type",
"Point"
],
[
"==",
"class",
"city"
]
],
"layout": {
"text-field": "{name_en}",
"text-font": [
"Klokantech Noto Sans Regular",
"Klokantech Noto Sans CJK Regular"
],
"text-max-width": 10,
"text-size": {
"stops": [
[
3,
12
],
[
8,
16
],
[
10,
20
]
]
}
},
"paint": {
"text-color": "rgba(255, 255, 255, 1)",
"text-halo-color": "rgba(0, 0, 0, 0.75)",
"text-halo-blur": 0.5,
"text-halo-width": 1
}
},
{
"id": "country_label",
"type": "symbol",
"source": "openmaptiles",
"source-layer": "place",
"maxzoom": 12,
"filter": [
"all",
[
"==",
"$type",
"Point"
],
[
"==",
"class",
"country"
]
],
"layout": {
"text-field": "{name_en}",
"text-font": [
"Klokantech Noto Sans Bold",
"Klokantech Noto Sans CJK Bold"
],
"text-max-width": 10,
"text-size": {
"stops": [
[
3,
12
],
[
8,
22
]
]
}
},
"paint": {
"text-color": "rgba(255, 255, 255, 1)",
"text-halo-color": "rgba(0, 0, 0, 1)",
"text-halo-width": 1,
"text-halo-blur": 1
}
}
],
"id": "ciwf4zbsv007y2pmt2rspc1dc"
},
attributionControl: true,
hash: true
});
map.addControl(new mapboxgl.NavigationControl());
<\/script>
</body>
</html></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment