diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml index 93960b2..66afcc7 100644 --- a/roles/docker/tasks/main.yml +++ b/roles/docker/tasks/main.yml @@ -14,4 +14,4 @@ - docker-ce - docker-ce-cli - containerd.io - - docker-compose + - python-docker diff --git a/roles/tileserver/files/config.json b/roles/tileserver/files/config.json new file mode 100644 index 0000000..072b18b --- /dev/null +++ b/roles/tileserver/files/config.json @@ -0,0 +1,31 @@ +{ + "options": { + "paths": { + "root": "/usr/src/app/node_modules/tileserver-gl-styles", + "fonts": "fonts", + "styles": "/data/styles", + "mbtiles": "/data" + }, + "formatQuality": { + "jpeg": 80, + "webp": 90 + } + }, + "styles": { + "day": { + "style": "day.json", + "tilejson": { + } + }, + "night": { + "style": "night.json", + "tilejson": { + } + } + }, + "data": { + "v3": { + "mbtiles": "tiles.mbtiles" + } + } +} diff --git a/roles/tileserver/files/styles/day.json b/roles/tileserver/files/styles/day.json new file mode 100644 index 0000000..f23ae93 --- /dev/null +++ b/roles/tileserver/files/styles/day.json @@ -0,0 +1,1750 @@ +{ + "version":8, + "name":"FF day", + "metadata":{ + "openmaptiles:version":"3.x" + }, + "center":[ + 12.05, + 49.85 + ], + "zoom":10, + "bearing":0, + "pitch":0, + "sources":{ + "openmaptiles":{ + "type":"vector", + "url":"mbtiles://{v3}" + } + }, + "glyphs":"{fontstack}/{range}.pbf", + "layers":[ + { + "id":"background", + "paint":{ + "background-color":"hsl(47, 26%, 88%)" + }, + "type":"background" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "Polygon" + ], + [ + "in", + "class", + "residential", + "suburb", + "neighbourhood" + ] + ], + "id":"landuse-residential", + "paint":{ + "fill-color":"hsl(47, 13%, 86%)", + "fill-opacity":0.7 + }, + "source":"openmaptiles", + "source-layer":"landuse", + "type":"fill" + }, + { + "filter":[ + "==", + "class", + "grass" + ], + "id":"landcover_grass", + "paint":{ + "fill-color":"hsl(82, 46%, 72%)", + "fill-opacity":0.45 + }, + "source":"openmaptiles", + "source-layer":"landcover", + "type":"fill" + }, + { + "filter":[ + "==", + "class", + "wood" + ], + "id":"landcover_wood", + "paint":{ + "fill-color":"hsl(82, 46%, 72%)", + "fill-opacity":{ + "base":1, + "stops":[ + [ + 8, + 0.6 + ], + [ + 22, + 1 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"landcover", + "type":"fill" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "Polygon" + ], + [ + "!=", + "intermittent", + 1 + ], + [ + "!=", + "brunnel", + "tunnel" + ] + ], + "id":"water", + "paint":{ + "fill-color":"hsl(205, 56%, 73%)" + }, + "source":"openmaptiles", + "source-layer":"water", + "type":"fill" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "Polygon" + ], + [ + "==", + "intermittent", + 1 + ] + ], + "id":"water_intermittent", + "paint":{ + "fill-color":"hsl(205, 56%, 73%)", + "fill-opacity":0.7 + }, + "source":"openmaptiles", + "source-layer":"water", + "type":"fill" + }, + { + "filter":[ + "==", + "subclass", + "ice_shelf" + ], + "id":"landcover-ice-shelf", + "paint":{ + "fill-color":"hsl(47, 26%, 88%)", + "fill-opacity":0.8 + }, + "source":"openmaptiles", + "source-layer":"landcover", + "type":"fill" + }, + { + "filter":[ + "==", + "subclass", + "glacier" + ], + "id":"landcover-glacier", + "paint":{ + "fill-color":"hsl(47, 22%, 94%)", + "fill-opacity":{ + "base":1, + "stops":[ + [ + 0, + 1 + ], + [ + 8, + 0.5 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"landcover", + "type":"fill" + }, + { + "filter":[ + "all", + [ + "in", + "class", + "sand" + ] + ], + "id":"landcover_sand", + "metadata":{ + + }, + "paint":{ + "fill-antialias":false, + "fill-color":"rgba(232, 214, 38, 1)", + "fill-opacity":0.3 + }, + "source":"openmaptiles", + "source-layer":"landcover", + "type":"fill" + }, + { + "filter":[ + "==", + "class", + "agriculture" + ], + "id":"landuse", + "paint":{ + "fill-color":"#eae0d0" + }, + "source":"openmaptiles", + "source-layer":"landuse", + "type":"fill" + }, + { + "filter":[ + "==", + "class", + "national_park" + ], + "id":"landuse_overlay_national_park", + "paint":{ + "fill-color":"#E1EBB0", + "fill-opacity":{ + "base":1, + "stops":[ + [ + 5, + 0 + ], + [ + 9, + 0.75 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"landcover", + "type":"fill" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "brunnel", + "tunnel" + ] + ], + "id":"waterway-tunnel", + "paint":{ + "line-color":"hsl(205, 56%, 73%)", + "line-dasharray":[ + 3, + 3 + ], + "line-gap-width":{ + "stops":[ + [ + 12, + 0 + ], + [ + 20, + 6 + ] + ] + }, + "line-opacity":1, + "line-width":{ + "base":1.4, + "stops":[ + [ + 8, + 1 + ], + [ + 20, + 2 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"waterway", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "!in", + "brunnel", + "tunnel", + "bridge" + ], + [ + "!=", + "intermittent", + 1 + ] + ], + "id":"waterway", + "paint":{ + "line-color":"hsl(205, 56%, 73%)", + "line-opacity":1, + "line-width":{ + "base":1.4, + "stops":[ + [ + 8, + 1 + ], + [ + 20, + 8 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"waterway", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "!in", + "brunnel", + "tunnel", + "bridge" + ], + [ + "==", + "intermittent", + 1 + ] + ], + "id":"waterway_intermittent", + "paint":{ + "line-color":"hsl(205, 56%, 73%)", + "line-opacity":1, + "line-width":{ + "base":1.4, + "stops":[ + [ + 8, + 1 + ], + [ + 20, + 8 + ] + ] + }, + "line-dasharray":[ + 2, + 1 + ] + }, + "source":"openmaptiles", + "source-layer":"waterway", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "brunnel", + "tunnel" + ], + [ + "==", + "class", + "transit" + ] + ], + "id":"tunnel_railway_transit", + "layout":{ + "line-cap":"butt", + "line-join":"miter" + }, + "minzoom":0, + "paint":{ + "line-color":"hsl(34, 12%, 66%)", + "line-dasharray":[ + 3, + 3 + ], + "line-opacity":{ + "base":1, + "stops":[ + [ + 11, + 0 + ], + [ + 16, + 1 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "id":"building", + "paint":{ + "fill-antialias":true, + "fill-color":"rgba(222, 211, 190, 1)", + "fill-opacity":{ + "base":1, + "stops":[ + [ + 13, + 0 + ], + [ + 15, + 1 + ] + ] + }, + "fill-outline-color":{ + "stops":[ + [ + 15, + "rgba(212, 177, 146, 0)" + ], + [ + 16, + "rgba(212, 177, 146, 0.5)" + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"building", + "type":"fill" + }, + { + "filter":[ + "==", + "$type", + "Point" + ], + "id":"housenumber", + "layout":{ + "text-field":"{housenumber}", + "text-font":[ + "Noto Sans Regular" + ], + "text-size":10 + }, + "minzoom":17, + "paint":{ + "text-color":"rgba(212, 177, 146, 1)" + }, + "source":"openmaptiles", + "source-layer":"housenumber", + "type":"symbol" + }, + { + "id":"road_area_pier", + "type":"fill", + "metadata":{ + + }, + "source":"openmaptiles", + "source-layer":"transportation", + "filter":[ + "all", + [ + "==", + "$type", + "Polygon" + ], + [ + "==", + "class", + "pier" + ] + ], + "paint":{ + "fill-color":"hsl(47, 26%, 88%)", + "fill-antialias":true + } + }, + { + "id":"road_pier", + "type":"line", + "metadata":{ + + }, + "source":"openmaptiles", + "source-layer":"transportation", + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "pier" + ] + ], + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "paint":{ + "line-color":"hsl(47, 26%, 88%)", + "line-width":{ + "base":1.2, + "stops":[ + [ + 15, + 1 + ], + [ + 17, + 4 + ] + ] + } + } + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "Polygon" + ], + [ + "in", + "brunnel", + "bridge" + ] + ], + "id":"road_bridge_area", + "layout":{ + + }, + "paint":{ + "fill-color":"hsl(47, 26%, 88%)", + "fill-opacity":0.5 + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"fill" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "path", + "track" + ] + ], + "id":"road_path", + "layout":{ + "line-cap":"square", + "line-join":"bevel" + }, + "paint":{ + "line-color":"hsl(0, 0%, 97%)", + "line-dasharray":[ + 1, + 1 + ], + "line-width":{ + "base":1.55, + "stops":[ + [ + 4, + 0.25 + ], + [ + 20, + 10 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "minor", + "service" + ] + ], + "id":"road_minor", + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "paint":{ + "line-color":"hsl(0, 0%, 97%)", + "line-width":{ + "base":1.55, + "stops":[ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line", + "minzoom":13 + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "brunnel", + "tunnel" + ], + [ + "==", + "class", + "minor_road" + ] + ], + "id":"tunnel_minor", + "layout":{ + "line-cap":"butt", + "line-join":"miter" + }, + "paint":{ + "line-color":"#efefef", + "line-dasharray":[ + 0.36, + 0.18 + ], + "line-width":{ + "base":1.55, + "stops":[ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "brunnel", + "tunnel" + ], + [ + "in", + "class", + "primary", + "secondary", + "tertiary", + "trunk" + ] + ], + "id":"tunnel_major", + "layout":{ + "line-cap":"butt", + "line-join":"miter" + }, + "paint":{ + "line-color":"#fff", + "line-dasharray":[ + 0.28, + 0.14 + ], + "line-width":{ + "base":1.4, + "stops":[ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "Polygon" + ], + [ + "in", + "class", + "runway", + "taxiway" + ] + ], + "id":"aeroway-area", + "metadata":{ + "mapbox:group":"1444849345966.4436" + }, + "minzoom":4, + "paint":{ + "fill-color":"rgba(255, 255, 255, 1)", + "fill-opacity":{ + "base":1, + "stops":[ + [ + 13, + 0 + ], + [ + 14, + 1 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"aeroway", + "type":"fill" + }, + { + "filter":[ + "all", + [ + "in", + "class", + "taxiway" + ], + [ + "==", + "$type", + "LineString" + ] + ], + "id":"aeroway-taxiway", + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "metadata":{ + "mapbox:group":"1444849345966.4436" + }, + "minzoom":12, + "paint":{ + "line-color":"rgba(255, 255, 255, 1)", + "line-opacity":1, + "line-width":{ + "base":1.5, + "stops":[ + [ + 12, + 1 + ], + [ + 17, + 10 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"aeroway", + "type":"line" + }, + { + "filter":[ + "all", + [ + "in", + "class", + "runway" + ], + [ + "==", + "$type", + "LineString" + ] + ], + "id":"aeroway-runway", + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "metadata":{ + "mapbox:group":"1444849345966.4436" + }, + "minzoom":4, + "paint":{ + "line-color":"rgba(255, 255, 255, 1)", + "line-opacity":1, + "line-width":{ + "base":1.5, + "stops":[ + [ + 11, + 4 + ], + [ + 17, + 50 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"aeroway", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "trunk", + "primary" + ] + ], + "id":"road_trunk_primary", + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "paint":{ + "line-color":"#fff", + "line-width":{ + "base":1.4, + "stops":[ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "secondary", + "tertiary" + ] + ], + "id":"road_secondary_tertiary", + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "paint":{ + "line-color":"#fff", + "line-width":{ + "base":1.4, + "stops":[ + [ + 6, + 0.5 + ], + [ + 20, + 20 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "class", + "motorway" + ] + ], + "id":"road_major_motorway", + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "paint":{ + "line-color":"hsl(0, 0%, 100%)", + "line-offset":0, + "line-width":{ + "base":1.4, + "stops":[ + [ + 8, + 1 + ], + [ + 16, + 10 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "class", + "transit" + ], + [ + "!=", + "brunnel", + "tunnel" + ] + ], + "id":"railway-transit", + "paint":{ + "line-color":"hsl(34, 12%, 66%)", + "line-opacity":{ + "base":1, + "stops":[ + [ + 11, + 0 + ], + [ + 16, + 1 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "==", + "class", + "rail" + ], + "id":"railway", + "paint":{ + "line-color":"hsl(34, 12%, 66%)", + "line-opacity":{ + "base":1, + "stops":[ + [ + 11, + 0 + ], + [ + 16, + 1 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "brunnel", + "bridge" + ] + ], + "id":"waterway-bridge-case", + "layout":{ + "line-cap":"butt", + "line-join":"miter" + }, + "paint":{ + "line-color":"#bbbbbb", + "line-gap-width":{ + "base":1.55, + "stops":[ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + }, + "line-width":{ + "base":1.6, + "stops":[ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"waterway", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "brunnel", + "bridge" + ] + ], + "id":"waterway-bridge", + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "paint":{ + "line-color":"hsl(205, 56%, 73%)", + "line-width":{ + "base":1.55, + "stops":[ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"waterway", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "brunnel", + "bridge" + ], + [ + "==", + "class", + "minor_road" + ] + ], + "id":"bridge_minor case", + "layout":{ + "line-cap":"butt", + "line-join":"miter" + }, + "paint":{ + "line-color":"#dedede", + "line-gap-width":{ + "base":1.55, + "stops":[ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + }, + "line-width":{ + "base":1.6, + "stops":[ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "brunnel", + "bridge" + ], + [ + "in", + "class", + "primary", + "secondary", + "tertiary", + "trunk" + ] + ], + "id":"bridge_major case", + "layout":{ + "line-cap":"butt", + "line-join":"miter" + }, + "paint":{ + "line-color":"#dedede", + "line-gap-width":{ + "base":1.55, + "stops":[ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + }, + "line-width":{ + "base":1.6, + "stops":[ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "brunnel", + "bridge" + ], + [ + "==", + "class", + "minor_road" + ] + ], + "id":"bridge_minor", + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "paint":{ + "line-color":"#efefef", + "line-width":{ + "base":1.55, + "stops":[ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "brunnel", + "bridge" + ], + [ + "in", + "class", + "primary", + "secondary", + "tertiary", + "trunk" + ] + ], + "id":"bridge_major", + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "paint":{ + "line-color":"#fff", + "line-width":{ + "base":1.4, + "stops":[ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "in", + "admin_level", + 4, + 6, + 8 + ], + "id":"admin_sub", + "paint":{ + "line-color":"hsla(0, 0%, 60%, 0.5)", + "line-dasharray":[ + 2, + 1 + ] + }, + "source":"openmaptiles", + "source-layer":"boundary", + "type":"line" + }, + { + "filter":[ + "all", + [ + "<=", + "admin_level", + 2 + ], + [ + "==", + "$type", + "LineString" + ] + ], + "id":"admin_country", + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "paint":{ + "line-color":"hsl(0, 0%, 60%)", + "line-width":{ + "base":1.3, + "stops":[ + [ + 3, + 0.5 + ], + [ + 22, + 15 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"boundary", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "rank", + 1 + ] + ], + "id":"poi_label", + "layout":{ + "icon-size":1, + "text-anchor":"top", + "text-field":"{name}", + "text-font":[ + "Noto Sans Regular" + ], + "text-max-width":8, + "text-offset":[ + 0, + 0.5 + ], + "text-size":11 + }, + "minzoom":14, + "paint":{ + "text-color":"#666", + "text-halo-blur":1, + "text-halo-color":"rgba(255,255,255,0.75)", + "text-halo-width":1 + }, + "source":"openmaptiles", + "source-layer":"poi", + "type":"symbol" + }, + { + "filter":[ + "all", + [ + "has", + "iata" + ] + ], + "id":"airport-label", + "layout":{ + "icon-size":1, + "text-anchor":"top", + "text-field":"{name:latin}\n{name:nonlatin}", + "text-font":[ + "Noto Sans Regular" + ], + "text-max-width":8, + "text-offset":[ + 0, + 0.5 + ], + "text-size":11 + }, + "minzoom":10, + "paint":{ + "text-color":"#666", + "text-halo-blur":1, + "text-halo-color":"rgba(255,255,255,0.75)", + "text-halo-width":1 + }, + "source":"openmaptiles", + "source-layer":"aerodrome_label", + "type":"symbol" + }, + { + "filter":[ + "==", + "$type", + "LineString" + ], + "id":"road_major_label", + "layout":{ + "symbol-placement":"line", + "text-field":"{name:latin} {name:nonlatin}", + "text-font":[ + "Noto Sans Regular" + ], + "text-letter-spacing":0.1, + "text-rotation-alignment":"map", + "text-size":{ + "base":1.4, + "stops":[ + [ + 10, + 8 + ], + [ + 20, + 14 + ] + ] + }, + "text-transform":"uppercase" + }, + "paint":{ + "text-color":"#000", + "text-halo-color":"hsl(0, 0%, 100%)", + "text-halo-width":2 + }, + "source":"openmaptiles", + "source-layer":"transportation_name", + "type":"symbol" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "!in", + "class", + "city", + "state", + "country", + "continent" + ] + ], + "id":"place_label_other", + "layout":{ + "text-anchor":"center", + "text-field":"{name:latin}\n{name:nonlatin}", + "text-font":[ + "Noto Sans Regular" + ], + "text-max-width":6, + "text-size":{ + "stops":[ + [ + 6, + 10 + ], + [ + 12, + 14 + ] + ] + } + }, + "minzoom":8, + "paint":{ + "text-color":"hsl(0, 0%, 25%)", + "text-halo-blur":0, + "text-halo-color":"hsl(0, 0%, 100%)", + "text-halo-width":2 + }, + "source":"openmaptiles", + "source-layer":"place", + "type":"symbol" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "class", + "city" + ] + ], + "id":"place_label_city", + "layout":{ + "text-field":"{name:latin}\n{name:nonlatin}", + "text-font":[ + "Noto Sans Regular" + ], + "text-max-width":10, + "text-size":{ + "stops":[ + [ + 3, + 12 + ], + [ + 8, + 16 + ] + ] + } + }, + "maxzoom":16, + "paint":{ + "text-color":"hsl(0, 0%, 0%)", + "text-halo-blur":0, + "text-halo-color":"hsla(0, 0%, 100%, 0.75)", + "text-halo-width":2 + }, + "source":"openmaptiles", + "source-layer":"place", + "type":"symbol" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "class", + "country" + ], + [ + "!has", + "iso_a2" + ] + ], + "id":"country_label-other", + "layout":{ + "text-field":"{name:latin}", + "text-font":[ + "Noto Sans Regular" + ], + "text-max-width":10, + "text-size":{ + "stops":[ + [ + 3, + 12 + ], + [ + 8, + 22 + ] + ] + } + }, + "maxzoom":12, + "paint":{ + "text-color":"hsl(0, 0%, 13%)", + "text-halo-blur":0, + "text-halo-color":"rgba(255,255,255,0.75)", + "text-halo-width":2 + }, + "source":"openmaptiles", + "source-layer":"place", + "type":"symbol" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "class", + "country" + ], + [ + "has", + "iso_a2" + ] + ], + "id":"country_label", + "layout":{ + "text-field":"{name:latin}", + "text-font":[ + "Noto Sans Regular" + ], + "text-max-width":10, + "text-size":{ + "stops":[ + [ + 3, + 12 + ], + [ + 8, + 22 + ] + ] + } + }, + "maxzoom":12, + "paint":{ + "text-color":"hsl(0, 0%, 13%)", + "text-halo-blur":0, + "text-halo-color":"rgba(255,255,255,0.75)", + "text-halo-width":2 + }, + "source":"openmaptiles", + "source-layer":"place", + "type":"symbol" + } + ], + "id":"ff-day" +} diff --git a/roles/tileserver/files/styles/night.json b/roles/tileserver/files/styles/night.json new file mode 100644 index 0000000..189691c --- /dev/null +++ b/roles/tileserver/files/styles/night.json @@ -0,0 +1,1722 @@ +{ + "version":8, + "name":"FF night", + "metadata":{ + "openmaptiles:version":"3.x" + }, + "center":[ + 12.05, + 49.85 + ], + "zoom":10, + "bearing":0, + "pitch":0, + "sources":{ + "openmaptiles":{ + "type":"vector", + "url":"mbtiles://{v3}" + } + }, + "glyphs":"{fontstack}/{range}.pbf", + "layers":[ + { + "id":"background", + "paint":{ + "background-color":"rgb(10, 58, 84)" + }, + "type":"background" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "Polygon" + ], + [ + "in", + "class", + "residential", + "suburb", + "neighbourhood" + ] + ], + "id":"landuse-residential", + "paint":{ + "fill-color":"rgb(14, 50, 69)", + "fill-opacity":0.7 + }, + "source":"openmaptiles", + "source-layer":"landuse", + "type":"fill" + }, + { + "filter":[ + "==", + "class", + "grass" + ], + "id":"landcover_grass", + "paint":{ + "fill-color":"rgb(6, 102, 109)", + "fill-opacity":0.4 + }, + "source":"openmaptiles", + "source-layer":"landcover", + "type":"fill" + }, + { + "filter":[ + "==", + "class", + "wood" + ], + "id":"landcover_wood", + "paint":{ + "fill-color":"rgb(0, 100, 96)", + "fill-opacity":{ + "base":1, + "stops":[ + [ + 8, + 0.6 + ], + [ + 22, + 1 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"landcover", + "type":"fill" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "Polygon" + ], + [ + "!=", + "intermittent", + 1 + ], + [ + "!=", + "brunnel", + "tunnel" + ] + ], + "id":"water", + "paint":{ + "fill-color":"rgb(1, 20, 33)" + }, + "source":"openmaptiles", + "source-layer":"water", + "type":"fill" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "Polygon" + ], + [ + "==", + "intermittent", + 1 + ] + ], + "id":"water_intermittent", + "paint":{ + "fill-color":"rgb(1, 20, 33)", + "fill-opacity":0.7 + }, + "source":"openmaptiles", + "source-layer":"water", + "type":"fill" + }, + { + "filter":[ + "==", + "subclass", + "ice_shelf" + ], + "id":"landcover-ice-shelf", + "layout":{ + "visibility":"none" + }, + "paint":{ + "fill-color":"hsl(47, 26%, 88%)", + "fill-opacity":0.8 + }, + "source":"openmaptiles", + "source-layer":"landcover", + "type":"fill" + }, + { + "filter":[ + "==", + "subclass", + "glacier" + ], + "id":"landcover-glacier", + "layout":{ + "visibility":"none" + }, + "paint":{ + "fill-color":"hsl(47, 22%, 94%)", + "fill-opacity":{ + "base":1, + "stops":[ + [ + 0, + 1 + ], + [ + 8, + 0.5 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"landcover", + "type":"fill" + }, + { + "filter":[ + "all", + [ + "in", + "class", + "sand" + ] + ], + "id":"landcover_sand", + "metadata":{ + + }, + "paint":{ + "fill-antialias":false, + "fill-color":"rgb(0, 3, 2)", + "fill-opacity":0.3 + }, + "source":"openmaptiles", + "source-layer":"landcover", + "type":"fill" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "brunnel", + "tunnel" + ] + ], + "id":"waterway-tunnel", + "paint":{ + "line-color":"rgb(1, 20, 33)", + "line-dasharray":[ + 3, + 3 + ], + "line-gap-width":{ + "stops":[ + [ + 12, + 0 + ], + [ + 20, + 6 + ] + ] + }, + "line-opacity":1, + "line-width":{ + "base":1.4, + "stops":[ + [ + 8, + 1 + ], + [ + 20, + 2 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"waterway", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "!in", + "brunnel", + "tunnel", + "bridge" + ], + [ + "!=", + "intermittent", + 1 + ] + ], + "id":"waterway", + "paint":{ + "line-color":"rgb(1, 20, 33)", + "line-opacity":1, + "line-width":{ + "base":1.4, + "stops":[ + [ + 8, + 1 + ], + [ + 20, + 8 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"waterway", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "!in", + "brunnel", + "tunnel", + "bridge" + ], + [ + "==", + "intermittent", + 1 + ] + ], + "id":"waterway_intermittent", + "paint":{ + "line-color":"rgb(1, 20, 33)", + "line-opacity":1, + "line-width":{ + "base":1.4, + "stops":[ + [ + 8, + 1 + ], + [ + 20, + 8 + ] + ] + }, + "line-dasharray":[ + 2, + 1 + ] + }, + "source":"openmaptiles", + "source-layer":"waterway", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "brunnel", + "tunnel" + ], + [ + "==", + "class", + "transit" + ] + ], + "id":"tunnel_railway_transit", + "layout":{ + "line-cap":"butt", + "line-join":"miter" + }, + "minzoom":0, + "paint":{ + "line-color":"rgb(0, 0, 0)", + "line-dasharray":[ + 3, + 3 + ], + "line-opacity":{ + "base":1, + "stops":[ + [ + 11, + 0 + ], + [ + 16, + 1 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "id":"building", + "paint":{ + "fill-antialias":true, + "fill-color":"rgb(10, 18, 32)", + "fill-opacity":{ + "base":1, + "stops":[ + [ + 13, + 0 + ], + [ + 15, + 1 + ] + ] + }, + "fill-outline-color":{ + "stops":[ + [ + 15, + "rgba(0, 0, 0, 0)" + ], + [ + 16, + "rgba(0, 0, 0, 0.5)" + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"building", + "type":"fill" + }, + { + "filter":[ + "==", + "$type", + "Point" + ], + "id":"housenumber", + "layout":{ + "text-field":"{housenumber}", + "text-font":[ + "Noto Sans Regular" + ], + "text-size":10 + }, + "minzoom":17, + "paint":{ + "text-color":"rgba(107, 104, 102, 1)" + }, + "source":"openmaptiles", + "source-layer":"housenumber", + "type":"symbol" + }, + { + "id":"road_area_pier", + "type":"fill", + "metadata":{ + + }, + "source":"openmaptiles", + "source-layer":"transportation", + "filter":[ + "all", + [ + "==", + "$type", + "Polygon" + ], + [ + "==", + "class", + "pier" + ] + ], + "paint":{ + "fill-antialias":true, + "fill-color":"rgb(10, 58, 84)" + } + }, + { + "id":"road_pier", + "type":"line", + "metadata":{ + + }, + "source":"openmaptiles", + "source-layer":"transportation", + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "pier" + ] + ], + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "paint":{ + "line-color":"rgb(0, 0, 0)", + "line-width":{ + "base":1.2, + "stops":[ + [ + 15, + 1 + ], + [ + 17, + 4 + ] + ] + } + } + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "Polygon" + ], + [ + "in", + "brunnel", + "bridge" + ] + ], + "id":"road_bridge_area", + "layout":{ + + }, + "paint":{ + "fill-color":"rgb(10, 58, 84)", + "fill-opacity":0.5 + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"fill" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "path", + "track" + ] + ], + "id":"road_path", + "layout":{ + "line-cap":"square", + "line-join":"bevel" + }, + "paint":{ + "line-color":"rgb(10, 19, 34)", + "line-dasharray":[ + 1, + 1 + ], + "line-width":{ + "base":1.55, + "stops":[ + [ + 4, + 0.25 + ], + [ + 20, + 7 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "minor", + "service" + ] + ], + "id":"road_minor", + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "paint":{ + "line-color":"rgb(10, 19, 34)", + "line-width":{ + "base":1.55, + "stops":[ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line", + "minzoom":13 + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "brunnel", + "tunnel" + ], + [ + "==", + "class", + "minor_road" + ] + ], + "id":"tunnel_minor", + "layout":{ + "line-cap":"butt", + "line-join":"miter" + }, + "paint":{ + "line-color":"rgb(7, 12, 21)", + "line-dasharray":[ + 0.36, + 0.18 + ], + "line-width":{ + "base":1.55, + "stops":[ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "brunnel", + "tunnel" + ], + [ + "in", + "class", + "primary", + "secondary", + "tertiary", + "trunk" + ] + ], + "id":"tunnel_major", + "layout":{ + "line-cap":"butt", + "line-join":"miter" + }, + "paint":{ + "line-color":"rgb(14, 25, 46)", + "line-dasharray":[ + 0.28, + 0.14 + ], + "line-width":{ + "base":1.4, + "stops":[ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "Polygon" + ], + [ + "in", + "class", + "runway", + "taxiway" + ] + ], + "id":"aeroway-area", + "metadata":{ + "mapbox:group":"1444849345966.4436" + }, + "minzoom":4, + "paint":{ + "fill-color":"rgba(255, 255, 255, 1)", + "fill-opacity":{ + "base":1, + "stops":[ + [ + 13, + 0 + ], + [ + 14, + 1 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"aeroway", + "type":"fill" + }, + { + "filter":[ + "all", + [ + "in", + "class", + "taxiway" + ], + [ + "==", + "$type", + "LineString" + ] + ], + "id":"aeroway-taxiway", + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "metadata":{ + "mapbox:group":"1444849345966.4436" + }, + "minzoom":12, + "paint":{ + "line-color":"rgb(14, 25, 46)", + "line-opacity":1, + "line-width":{ + "base":1.5, + "stops":[ + [ + 12, + 1 + ], + [ + 17, + 10 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"aeroway", + "type":"line" + }, + { + "filter":[ + "all", + [ + "in", + "class", + "runway" + ], + [ + "==", + "$type", + "LineString" + ] + ], + "id":"aeroway-runway", + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "metadata":{ + "mapbox:group":"1444849345966.4436" + }, + "minzoom":4, + "paint":{ + "line-color":"rgb(14, 25, 46)", + "line-opacity":1, + "line-width":{ + "base":1.5, + "stops":[ + [ + 11, + 4 + ], + [ + 17, + 50 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"aeroway", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "trunk", + "primary" + ] + ], + "id":"road_trunk_primary", + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "paint":{ + "line-color":"rgb(14, 25, 46)", + "line-width":{ + "base":1.4, + "stops":[ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "secondary", + "tertiary" + ] + ], + "id":"road_secondary_tertiary", + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "paint":{ + "line-color":"rgb(14, 25, 46)", + "line-width":{ + "base":1.4, + "stops":[ + [ + 6, + 0.5 + ], + [ + 20, + 20 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "class", + "motorway" + ] + ], + "id":"road_major_motorway", + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "paint":{ + "line-color":"rgb(14, 25, 46)", + "line-offset":0, + "line-width":{ + "base":1.4, + "stops":[ + [ + 8, + 1 + ], + [ + 16, + 10 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "class", + "transit" + ], + [ + "!=", + "brunnel", + "tunnel" + ] + ], + "id":"railway-transit", + "paint":{ + "line-color":"rgb(0, 0, 0)", + "line-opacity":{ + "base":1, + "stops":[ + [ + 11, + 0 + ], + [ + 16, + 1 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "==", + "class", + "rail" + ], + "id":"railway", + "paint":{ + "line-color":"rgb(0, 0, 0)", + "line-opacity":{ + "base":1, + "stops":[ + [ + 11, + 0 + ], + [ + 16, + 1 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "brunnel", + "bridge" + ] + ], + "id":"waterway-bridge-case", + "layout":{ + "line-cap":"butt", + "line-join":"miter" + }, + "paint":{ + "line-color":"#bbbbbb", + "line-gap-width":{ + "base":1.55, + "stops":[ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + }, + "line-width":{ + "base":1.6, + "stops":[ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"waterway", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "brunnel", + "bridge" + ] + ], + "id":"waterway-bridge", + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "paint":{ + "line-color":"hsl(205, 56%, 73%)", + "line-width":{ + "base":1.55, + "stops":[ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"waterway", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "brunnel", + "bridge" + ], + [ + "==", + "class", + "minor_road" + ] + ], + "id":"bridge_minor case", + "layout":{ + "line-cap":"butt", + "line-join":"miter" + }, + "paint":{ + "line-color":"rgb(0, 0, 0)", + "line-gap-width":{ + "base":1.55, + "stops":[ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + }, + "line-width":{ + "base":1.6, + "stops":[ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "brunnel", + "bridge" + ], + [ + "in", + "class", + "primary", + "secondary", + "tertiary", + "trunk" + ] + ], + "id":"bridge_major case", + "layout":{ + "line-cap":"butt", + "line-join":"miter" + }, + "paint":{ + "line-color":"rgb(0, 0, 0)", + "line-gap-width":{ + "base":1.55, + "stops":[ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + }, + "line-width":{ + "base":1.6, + "stops":[ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "brunnel", + "bridge" + ], + [ + "==", + "class", + "minor_road" + ] + ], + "id":"bridge_minor", + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "paint":{ + "line-color":"rgb(7, 12, 21)", + "line-width":{ + "base":1.55, + "stops":[ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "brunnel", + "bridge" + ], + [ + "in", + "class", + "primary", + "secondary", + "tertiary", + "trunk" + ] + ], + "id":"bridge_major", + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "paint":{ + "line-color":"rgb(14, 25, 46)", + "line-width":{ + "base":1.4, + "stops":[ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source":"openmaptiles", + "source-layer":"transportation", + "type":"line" + }, + { + "filter":[ + "in", + "admin_level", + 4, + 6, + 8 + ], + "id":"admin_sub", + "paint":{ + "line-color":"rgba(176, 155, 76, 0.5)", + "line-dasharray":[ + 2, + 1 + ] + }, + "source":"openmaptiles", + "source-layer":"boundary", + "type":"line" + }, + { + "id":"admin_country_z0-4", + "type":"line", + "source":"openmaptiles", + "source-layer":"boundary", + "minzoom":0, + "maxzoom":5, + "filter":[ + "all", + [ + "<=", + "admin_level", + 2 + ], + [ + "==", + "$type", + "LineString" + ], + [ + "!has", + "claimed_by" + ] + ], + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "paint":{ + "line-color":"rgb(176, 155, 76)", + "line-width":{ + "base":1.3, + "stops":[ + [ + 3, + 0.5 + ], + [ + 22, + 15 + ] + ] + } + } + }, + { + "id":"admin_country_z5-", + "type":"line", + "source":"openmaptiles", + "source-layer":"boundary", + "minzoom":5, + "filter":[ + "all", + [ + "<=", + "admin_level", + 2 + ], + [ + "==", + "$type", + "LineString" + ] + ], + "layout":{ + "line-cap":"round", + "line-join":"round" + }, + "paint":{ + "line-color":"rgb(176, 155, 76)", + "line-width":{ + "base":1.3, + "stops":[ + [ + 3, + 0.5 + ], + [ + 22, + 15 + ] + ] + } + } + }, + { + "filter":[ + "all", + [ + "has", + "iata" + ] + ], + "id":"airport-label", + "layout":{ + "icon-size":1, + "text-anchor":"top", + "text-field":"{name:latin}\n{name:nonlatin}", + "text-font":[ + "Noto Sans Regular" + ], + "text-max-width":8, + "text-offset":[ + 0, + 0.5 + ], + "text-size":11 + }, + "minzoom":10, + "paint":{ + "text-color":"rgb(86, 89, 94)", + "text-halo-blur":1, + "text-halo-color":"rgba(0, 0, 0, 0.75)", + "text-halo-width":1 + }, + "source":"openmaptiles", + "source-layer":"aerodrome_label", + "type":"symbol" + }, + { + "minzoom":13, + "filter":[ + "==", + "$type", + "LineString" + ], + "id":"road_major_label", + "layout":{ + "symbol-placement":"line", + "text-field":"{name:latin} {name:nonlatin}", + "text-font":[ + "Noto Sans Regular" + ], + "text-letter-spacing":0.1, + "text-rotation-alignment":"map", + "text-size":{ + "base":1.4, + "stops":[ + [ + 10, + 8 + ], + [ + 20, + 14 + ] + ] + }, + "text-transform":"uppercase" + }, + "paint":{ + "text-color":"rgb(189, 191, 195)", + "text-halo-color":"rgb(0, 0, 0)", + "text-halo-width":2 + }, + "source":"openmaptiles", + "source-layer":"transportation_name", + "type":"symbol" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "!in", + "class", + "city", + "state", + "country", + "continent" + ] + ], + "id":"place_label_other", + "layout":{ + "text-anchor":"center", + "text-field":"{name:latin}\n{name:nonlatin}", + "text-font":[ + "Noto Sans Regular" + ], + "text-max-width":6, + "text-size":{ + "stops":[ + [ + 6, + 10 + ], + [ + 12, + 14 + ] + ] + } + }, + "minzoom":8, + "paint":{ + "text-color":"rgb(122, 126, 134)", + "text-halo-blur":0, + "text-halo-color":"rgb(0, 0, 0)", + "text-halo-width":2 + }, + "source":"openmaptiles", + "source-layer":"place", + "type":"symbol" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "class", + "city" + ] + ], + "id":"place_label_city", + "layout":{ + "text-field":"{name:latin}\n{name:nonlatin}", + "text-font":[ + "Noto Sans Regular" + ], + "text-max-width":10, + "text-size":{ + "stops":[ + [ + 3, + 11 + ], + [ + 8, + 16 + ] + ] + } + }, + "maxzoom":16, + "paint":{ + "text-color":"rgb(189, 191, 195)", + "text-halo-blur":0, + "text-halo-color":"rgba(0, 0, 0, 0.75)", + "text-halo-width":2 + }, + "source":"openmaptiles", + "source-layer":"place", + "type":"symbol" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "class", + "country" + ], + [ + "!has", + "iso_a2" + ] + ], + "id":"country_label-other", + "layout":{ + "text-field":"{name:latin}", + "text-font":[ + "Noto Sans Regular" + ], + "text-max-width":10, + "text-size":{ + "stops":[ + [ + 3, + 12 + ], + [ + 8, + 22 + ] + ] + } + }, + "maxzoom":12, + "paint":{ + "text-color":"rgb(154, 157, 163)", + "text-halo-blur":0, + "text-halo-color":"rgba(0, 0, 0, 0.75)", + "text-halo-width":2 + }, + "source":"openmaptiles", + "source-layer":"place", + "type":"symbol" + }, + { + "filter":[ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "class", + "country" + ], + [ + "has", + "iso_a2" + ] + ], + "id":"country_label", + "layout":{ + "text-field":"{name:latin}", + "text-font":[ + "Noto Sans Regular" + ], + "text-max-width":10, + "text-size":{ + "stops":[ + [ + 3, + 12 + ], + [ + 8, + 22 + ] + ] + } + }, + "maxzoom":12, + "paint":{ + "text-color":"rgb(154, 157, 163)", + "text-halo-blur":0, + "text-halo-color":"rgba(0, 0, 0, 0.75)", + "text-halo-width":2 + }, + "source":"openmaptiles", + "source-layer":"place", + "type":"symbol" + } + ], + "id":"ff-night" +} diff --git a/roles/tileserver/handlers/main.yml b/roles/tileserver/handlers/main.yml new file mode 100644 index 0000000..f9fea09 --- /dev/null +++ b/roles/tileserver/handlers/main.yml @@ -0,0 +1,16 @@ +--- + +- name: Restart tileserver + docker_container: + name: tileserver + image: maptiler/tileserver-gl + interactive: yes + ports: + - "80:80" + - "8080:8080" + restart: yes + restart_policy: unless-stopped + state: started + tty: yes + volumes: + - "/opt/tileserver:/data" diff --git a/roles/tileserver/tasks/main.yml b/roles/tileserver/tasks/main.yml new file mode 100644 index 0000000..19f9e0f --- /dev/null +++ b/roles/tileserver/tasks/main.yml @@ -0,0 +1,33 @@ +--- + +- name: Create data directories + file: + path: "{{ item }}" + state: directory + with_items: + - /opt/tileserver + - /opt/tileserver/styles + +- name: Configre tileserver + copy: + src: "{{ item }}" + dest: /opt/tileserver/{{ item }} + with_items: + - config.json + - styles/day.json + - styles/night.json + notify: Restart tileserver + +- name: Run tileserver container + docker_container: + name: tileserver + image: maptiler/tileserver-gl + interactive: yes + ports: + - "80:80" + - "8080:8080" + restart_policy: unless-stopped + state: started + tty: yes + volumes: + - "/opt/tileserver:/data" diff --git a/site.yml b/site.yml index 7994a70..7c282eb 100644 --- a/site.yml +++ b/site.yml @@ -41,3 +41,8 @@ hosts: [unms.ffrgb, unifi.ffrgb, tiles.ffrgb] roles: - docker + +- name: Setup tile server + hosts: tiles.ffrgb + roles: + - tileserver