Skip to content

Instantly share code, notes, and snippets.

@TDahlberg
Last active June 29, 2016 21:45
Show Gist options
  • Save TDahlberg/de87f07d9caac9b5b43e94c3d39240d8 to your computer and use it in GitHub Desktop.
Save TDahlberg/de87f07d9caac9b5b43e94c3d39240d8 to your computer and use it in GitHub Desktop.
{
"version": 8,
"name": "Basic",
"metadata": {
"mapbox:autocomposite": true,
"mapbox:type": "template"
},
"center": [
-75.42516234934952,
39.39305946139879
],
"zoom": 10.40473296560086,
"bearing": 0,
"pitch": 0,
"sources": {
"mapbox": {
"type": "vector",
"tiles": [
"http://localhost:8080/data/osm2vectortiles/{z}/{x}/{y}.pbf"
],
"maxzoom": 14
}
},
"sprite": "http://localhost:8080/data/osm2vectortiles/{z}/{x}/{y}.pbf",
"glyphs": "http://localhost:8080/fonts/{fontstack}/{range}.pbf",
"layers": [
{
"id": "background",
"type": "background",
"interactive": true,
"paint": {
"background-color": "#dedede"
}
},
{
"id": "landuse_overlay_national_park",
"type": "fill",
"source": "mapbox",
"source-layer": "landuse_overlay",
"interactive": true,
"filter": [
"==",
"class",
"national_park"
],
"paint": {
"fill-color": "#d2edae",
"fill-opacity": 0.75
}
},
{
"id": "landuse_park",
"type": "fill",
"source": "mapbox",
"source-layer": "landuse",
"interactive": true,
"filter": [
"==",
"class",
"park"
],
"paint": {
"fill-color": "#d2edae"
}
},
{
"id": "waterway",
"type": "line",
"source": "mapbox",
"source-layer": "waterway",
"interactive": true,
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"in",
"class",
"canal",
"river"
]
],
"paint": {
"line-color": "#a0cfdf",
"line-width": {
"base": 1.4,
"stops": [
[
8,
0.5
],
[
20,
15
]
]
}
}
},
{
"id": "water",
"type": "fill",
"source": "mapbox",
"source-layer": "water",
"interactive": true,
"paint": {
"fill-color": {
"base": 1,
"stops": [
[
3,
"hsl(245, 92%, 41%)"
],
[
11,
"hsl(190, 36%, 50%)"
]
]
}
}
},
{
"id": "building",
"type": "fill",
"source": "mapbox",
"source-layer": "building",
"interactive": true,
"paint": {
"fill-color": "#d6d6d6"
}
},
{
"id": "tunnel_minor",
"type": "line",
"source": "mapbox",
"source-layer": "road",
"interactive": true,
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"all",
[
"==",
"structure",
"tunnel"
],
[
"in",
"class",
"link",
"motorway_link",
"path",
"pedestrian",
"service",
"street",
"street_limited",
"track"
]
]
],
"layout": {
"line-cap": "butt",
"line-join": "miter"
},
"paint": {
"line-color": "#efefef",
"line-width": {
"base": 1.55,
"stops": [
[
4,
0.25
],
[
20,
30
]
]
},
"line-dasharray": [
0.36,
0.18
]
}
},
{
"id": "tunnel_major",
"type": "line",
"source": "mapbox",
"source-layer": "road",
"interactive": true,
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"all",
[
"==",
"structure",
"tunnel"
],
[
"in",
"class",
"motorway",
"primary",
"secondary",
"tertiary",
"trunk"
]
]
],
"layout": {
"line-cap": "butt",
"line-join": "miter"
},
"paint": {
"line-color": "#fff",
"line-width": {
"base": 1.4,
"stops": [
[
6,
0.5
],
[
20,
30
]
]
},
"line-dasharray": [
0.28,
0.14
]
}
},
{
"id": "road_minor",
"type": "line",
"source": "mapbox",
"source-layer": "road",
"interactive": true,
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"all",
[
"in",
"class",
"link",
"motorway_link",
"path",
"pedestrian",
"service",
"street",
"street_limited",
"track"
],
[
"in",
"structure",
"ford",
"none"
]
]
],
"layout": {
"line-cap": "round",
"line-join": "round"
},
"paint": {
"line-color": "#efefef",
"line-width": {
"base": 1.55,
"stops": [
[
4,
0.25
],
[
20,
30
]
]
}
}
},
{
"id": "road_major",
"type": "line",
"source": "mapbox",
"source-layer": "road",
"interactive": true,
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"all",
[
"in",
"class",
"motorway",
"primary",
"secondary",
"tertiary",
"trunk"
],
[
"in",
"structure",
"ford",
"none"
]
]
],
"layout": {
"line-cap": "round",
"line-join": "round"
},
"paint": {
"line-color": "#fff",
"line-width": {
"base": 1.4,
"stops": [
[
6,
0.5
],
[
20,
30
]
]
}
}
},
{
"id": "bridge_minor case",
"type": "line",
"source": "mapbox",
"source-layer": "road",
"interactive": true,
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"all",
[
"==",
"structure",
"bridge"
],
[
"in",
"class",
"link",
"motorway_link",
"path",
"pedestrian",
"service",
"street",
"street_limited",
"track"
]
]
],
"layout": {
"line-cap": "butt",
"line-join": "miter"
},
"paint": {
"line-color": "#dedede",
"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": "mapbox",
"source-layer": "road",
"interactive": true,
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"all",
[
"==",
"structure",
"bridge"
],
[
"in",
"class",
"motorway",
"primary",
"secondary",
"tertiary",
"trunk"
]
]
],
"layout": {
"line-cap": "butt",
"line-join": "miter"
},
"paint": {
"line-color": "#dedede",
"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": "mapbox",
"source-layer": "road",
"interactive": true,
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"all",
[
"==",
"structure",
"bridge"
],
[
"in",
"class",
"link",
"motorway_link",
"path",
"pedestrian",
"service",
"street",
"street_limited",
"track"
]
]
],
"layout": {
"line-cap": "round",
"line-join": "round"
},
"paint": {
"line-color": "#efefef",
"line-width": {
"base": 1.55,
"stops": [
[
4,
0.25
],
[
20,
30
]
]
}
}
},
{
"id": "bridge_major",
"type": "line",
"source": "mapbox",
"source-layer": "road",
"interactive": true,
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"all",
[
"==",
"structure",
"bridge"
],
[
"in",
"class",
"motorway",
"primary",
"secondary",
"tertiary",
"trunk"
]
]
],
"layout": {
"line-cap": "round",
"line-join": "round"
},
"paint": {
"line-color": "#fff",
"line-width": {
"base": 1.4,
"stops": [
[
6,
0.5
],
[
20,
30
]
]
}
}
},
{
"id": "admin_country",
"type": "line",
"source": "mapbox",
"source-layer": "admin",
"interactive": true,
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"all",
[
"<=",
"admin_level",
2
],
[
"==",
"maritime",
0
]
]
],
"layout": {
"line-cap": "round",
"line-join": "round"
},
"paint": {
"line-color": "#8b8a8a",
"line-width": {
"base": 1.3,
"stops": [
[
3,
0.5
],
[
22,
15
]
]
}
}
},
{
"id": "poi_label",
"type": "symbol",
"source": "mapbox",
"source-layer": "poi_label",
"minzoom": 5,
"interactive": true,
"filter": [
"all",
[
"==",
"$type",
"Point"
],
[
"all",
[
"==",
"localrank",
1
],
[
"==",
"scalerank",
1
]
]
],
"layout": {
"icon-image": "{maki}-11",
"text-offset": [
0,
0.5
],
"text-field": "{name_en}",
"text-font": [
"Open Sans Semibold",
"Arial Unicode MS Bold"
],
"text-max-width": 8,
"text-anchor": "top",
"text-size": 11,
"icon-size": 1
},
"paint": {
"text-color": "#666",
"text-halo-width": 1,
"text-halo-color": "rgba(255,255,255,0.75)",
"text-halo-blur": 1
}
},
{
"id": "road_major_label",
"type": "symbol",
"source": "mapbox",
"source-layer": "road_label",
"interactive": true,
"filter": [
"all",
[
"==",
"$type",
"LineString"
],
[
"in",
"class",
"motorway",
"primary",
"secondary",
"tertiary",
"trunk"
]
],
"layout": {
"symbol-placement": "line",
"text-field": "{name_en}",
"text-font": [
"Open Sans Semibold",
"Arial Unicode MS Bold"
],
"text-transform": "uppercase",
"text-letter-spacing": 0.1,
"text-size": {
"base": 1.4,
"stops": [
[
10,
8
],
[
20,
14
]
]
}
},
"paint": {
"text-color": "#666",
"text-halo-color": "rgba(255,255,255,0.75)",
"text-halo-width": 2
}
},
{
"id": "place_label_other",
"type": "symbol",
"source": "mapbox",
"source-layer": "place_label",
"minzoom": 8,
"interactive": true,
"filter": [
"all",
[
"==",
"$type",
"Point"
],
[
"in",
"type",
"hamlet",
"island",
"neighbourhood",
"suburb",
"town",
"village"
]
],
"layout": {
"text-field": "{name_en}",
"text-font": [
"Open Sans Semibold",
"Arial Unicode MS Bold"
],
"text-max-width": 6,
"text-size": {
"stops": [
[
6,
12
],
[
12,
16
]
]
}
},
"paint": {
"text-color": "#666",
"text-halo-color": "rgba(255,255,255,0.75)",
"text-halo-width": 1,
"text-halo-blur": 1
}
},
{
"id": "place_label_city",
"type": "symbol",
"source": "mapbox",
"source-layer": "place_label",
"maxzoom": 16,
"interactive": true,
"filter": [
"all",
[
"==",
"$type",
"Point"
],
[
"==",
"type",
"city"
]
],
"layout": {
"text-field": "{name_en}",
"text-font": [
"Open Sans Bold",
"Arial Unicode MS Bold"
],
"text-max-width": 10,
"text-size": {
"stops": [
[
3,
12
],
[
8,
16
]
]
}
},
"paint": {
"text-color": "#666",
"text-halo-color": "rgba(255,255,255,0.75)",
"text-halo-width": 1,
"text-halo-blur": 1
}
},
{
"id": "country_label",
"type": "symbol",
"source": "mapbox",
"source-layer": "country_label",
"maxzoom": 12,
"interactive": true,
"filter": [
"==",
"$type",
"Point"
],
"layout": {
"text-field": "{name_en}",
"text-font": [
"Open Sans Regular",
"Arial Unicode MS Regular"
],
"text-max-width": 10,
"text-size": {
"stops": [
[
3,
14
],
[
8,
22
]
]
}
},
"paint": {
"text-color": "#666",
"text-halo-color": "rgba(255,255,255,0.75)",
"text-halo-width": 1,
"text-halo-blur": 1
}
}
],
"created": "2016-06-28T19:41:33.805Z",
"id": "cipzuzxqo0000ayna9kk3gcke",
"modified": "2016-06-29T21:39:43.468Z",
"owner": "geotyler",
"draft": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment