Skip to content

Instantly share code, notes, and snippets.

@MathiasGroebe
Last active November 27, 2019 11:57
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 MathiasGroebe/2f0cc94fad82b99f651a0545258d39ff to your computer and use it in GitHub Desktop.
Save MathiasGroebe/2f0cc94fad82b99f651a0545258d39ff to your computer and use it in GitHub Desktop.
Sample vector map style
{
"version": 8,
"name": "ne_style",
"metadata": {
"mapbox:autocomposite": false,
"maputnik:renderer": "mbgljs"
},
"sources": {
"ne": {
"type": "vector",
"url": "http://127.0.0.1:6767/ne.json"
}
},
"glyphs": "http://127.0.0.1:6767/fonts/{fontstack}/{range}.pbf",
"layers": [
{
"id": "background_",
"type": "background",
"filter": [
"all"
],
"paint": {
"background-color": {
"stops": [
[
0,
"rgba(204, 243, 255, 1)"
],
[
10,
"rgba(184, 238, 255, 1)"
]
]
}
}
},
{
"id": "land",
"type": "fill",
"source": "ne",
"source-layer": "land",
"layout": {},
"paint": {
"fill-color": {
"stops": [
[
0,
"rgba(255, 255, 202, 1)"
],
[
10,
"rgba(254, 254, 205, 1)"
]
]
},
"fill-outline-color": "rgba(152, 202, 255, 0.66)"
}
},
{
"id": "rivers",
"type": "line",
"source": "ne",
"source-layer": "rivers",
"paint": {
"line-color": "rgba(161, 231, 254, 1)"
}
},
{
"id": "lakes",
"type": "fill",
"source": "ne",
"source-layer": "lakes",
"layout": {
"visibility": "visible"
},
"paint": {
"fill-color": "rgba(196, 241, 255, 1)"
}
},
{
"id": "boundary_lines",
"type": "line",
"source": "ne",
"source-layer": "boundary_lines",
"layout": {},
"paint": {
"line-color": "rgba(115, 115, 115, 0.7)",
"line-opacity": {
"stops": [
[
0,
0.1
],
[
10,
1
]
]
}
}
},
{
"id": "circles-equator",
"type": "line",
"source": "ne",
"source-layer": "geographic_lines",
"filter": [
"all",
[
"==",
"type",
"equator"
]
],
"paint": {
"line-color": "rgba(128, 128, 128, 0.75)"
}
},
{
"id": "circles",
"type": "line",
"source": "ne",
"source-layer": "geographic_lines",
"filter": [
"all",
[
"in",
"type",
"tropical_circle",
"polar_circle"
]
],
"paint": {
"line-color": "rgba(128, 128, 128, 0.49)",
"line-dasharray": [
4,
2
]
}
},
{
"id": "cities",
"type": "circle",
"source": "ne",
"source-layer": "cities",
"minzoom": 0,
"filter": [
"all",
[
"==",
"capital",
"no"
]
],
"paint": {
"circle-color": "rgba(0, 0, 0, 1)",
"circle-opacity": 0,
"circle-radius": {
"stops": [
[
0,
1.8
],
[
10,
2.3
]
]
},
"circle-stroke-width": 0.9
}
},
{
"id": "capital",
"type": "circle",
"source": "ne",
"source-layer": "cities",
"minzoom": 0,
"filter": [
"all",
[
"==",
"capital",
"yes"
]
],
"paint": {
"circle-color": "rgba(0, 0, 0, 1)",
"circle-opacity": 1,
"circle-radius": {
"stops": [
[
0,
1.5
],
[
4,
2
]
]
},
"circle-stroke-width": 0.9
}
},
{
"id": "cities-name",
"type": "symbol",
"source": "ne",
"source-layer": "cities",
"layout": {
"text-field": "{name}",
"text-size": {
"stops": [
[
0,
10
],
[
6,
13
]
]
},
"text-justify": "right",
"text-anchor": "left",
"text-offset": [
0.4,
0
]
},
"paint": {}
}
],
"id": "em3b1y55d",
"owner": "Mathias Gröbe"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment