generated from ztimson/template
init
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<div id="top" align="center">
|
<div id="top" align="center">
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
@@ -6,127 +6,83 @@
|
|||||||
<img src="https://git.zakscode.com/repo-avatars/2b4ee6ba1f2e2618bf7694e4a52fb56d1d0ea6abafa2dcbe496ab786b86d5a76" alt="Logo" width="200" height="200">
|
<img src="https://git.zakscode.com/repo-avatars/2b4ee6ba1f2e2618bf7694e4a52fb56d1d0ea6abafa2dcbe496ab786b86d5a76" alt="Logo" width="200" height="200">
|
||||||
|
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
### Template
|
### Viator
|
||||||
|
|
||||||
<!-- Description -->
|
<!-- Description -->
|
||||||
Simple repository template
|
Modular off-grid systems installer for Debian and Raspberry Pi OS.
|
||||||
|
|
||||||
<!-- Repo badges -->
|
<!-- Repo badges -->
|
||||||
[](https://git.zakscode.com/ztimson/template/tags)
|
[](https://git.zakscode.com/ztimson/viator/tags)
|
||||||
[](https://git.zakscode.com/ztimson/template/pulls)
|
[](https://git.zakscode.com/ztimson/viator/pulls)
|
||||||
[](https://git.zakscode.com/ztimson/template/issues)
|
[](https://git.zakscode.com/ztimson/viator/issues)
|
||||||
|
|
||||||
<!-- Links -->
|
<!-- Links -->
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
---
|
|
||||||
<div>
|
<div>
|
||||||
<a href="https://git.zakscode.com/ztimson/template/wiki" target="_blank">Documentation</a>
|
<a href="https://git.zakscode.com/ztimson/viator/wiki" target="_blank">Documentation</a>
|
||||||
• <a href="https://git.zakscode.com/ztimson/template/releases" target="_blank">Release Notes</a>
|
• <a href="https://git.zakscode.com/ztimson/viator/releases" target="_blank">Release Notes</a>
|
||||||
• <a href="https://git.zakscode.com/ztimson/template/issues/new?template=.github%2fissue_template%2fbug.md" target="_blank">Report a Bug</a>
|
• <a href="https://git.zakscode.com/ztimson/viator/issues/new?template=.github%2fissue_template%2fbug.md" target="_blank">Report a Bug</a>
|
||||||
• <a href="https://git.zakscode.com/ztimson/template/issues/new?template=.github%2fissue_template%2fenhancement.md" target="_blank">Request a Feature</a>
|
• <a href="https://git.zakscode.com/ztimson/viator/issues/new?template=.github%2fissue_template%2fenhancement.md" target="_blank">Request a Feature</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
- [Template](#top)
|
- [Viator](#top)
|
||||||
- [About](#about)
|
- [About](#about)
|
||||||
- [Demo](#demo)
|
- [Features](#features)
|
||||||
- [Built With](#built-with)
|
- [Built With](#built-with)
|
||||||
- [Setup](#setup)
|
- [Setup](#setup)
|
||||||
- [Production](#production)
|
- [Production](#production)
|
||||||
- [Development](#development)
|
- [Development](#development)
|
||||||
- [License](#license)
|
- [License](#license)
|
||||||
|
|
||||||
## About
|
## About
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
Viator is an interactive installer for building self-hosted, off-grid systems using Debian-based operating systems, with a focus on Raspberry Pi.
|
||||||
|
|
||||||
### Demo
|
It provides a collection of optional services and tools that can be independently installed and configured through a single menu-driven interface. Shared dependencies are handled automatically, and installations can be rerun without unnecessarily replacing existing configurations or persistent data.
|
||||||
|
|
||||||
Website: https://git.zakscode.com
|
### Features
|
||||||
|
|
||||||
|
- **System Tools** — System monitoring and administration utilities.
|
||||||
|
- **Networking** — WireGuard VPN, speed tests, SSL certs and fallback access point.
|
||||||
|
- **Remote Access** — VNC and HTTPS reverse proxy with automatic service discovery.
|
||||||
|
- **Local AI** — On-device inference using LiteRT and Gemma.
|
||||||
|
- **Wireless HAT** — GPS, LoRa, RTC and SDR hardware support.
|
||||||
|
- **Penetration Testing** — Network discovery, auditing and security utilities.
|
||||||
|
- **ATAK** — Situational awareness
|
||||||
|
- **Maps** — Offline maps, searching and printing (directions coming soon)
|
||||||
|
- **Personal Cloud** — AI harness, file editing, zim archives, auto notes and todo lists
|
||||||
|
- **Offline Archives** — Offline wikipedia and more
|
||||||
|
- **AI Radio Operator** — Connect Radios (digirig) and Mesh Radios to your AI Harness for an automated operator
|
||||||
|
- **Lora** — Expand the net and connect to your AI harness
|
||||||
|
- **SDR** — OpenWebRX+, RTL_433, ADS-B + AIS (connected to ATAK)
|
||||||
|
|
||||||
### Built With
|
### Built With
|
||||||
[](https://angular.io/)
|
|
||||||
[](https://www.android.com/)
|
[](https://www.debian.org/)
|
||||||
[](https://www.arduino.cc/)
|
|
||||||
[](https://getbootstrap.com)
|
|
||||||
[](https://en.cppreference.com/w/c/language)
|
|
||||||
[](https://cplusplus.com/)
|
|
||||||
[](https://dotnet.microsoft.com/)
|
|
||||||
[](https://www.w3.org/Style/CSS/Overview.en.html)
|
|
||||||
[](https://www.djangoproject.com/)
|
|
||||||
[](https://docker.com/)
|
[](https://docker.com/)
|
||||||
[](https://www.electronjs.org/)
|
[](https://www.raspberrypi.com/)
|
||||||
[](https://firebase.google.com/)
|
|
||||||
[](https://go.dev/)
|
|
||||||
[](https://graphql.org/)
|
|
||||||
[](https://developer.mozilla.org/en-US/docs/Glossary/HTML)
|
|
||||||
[](https://java.com/)
|
|
||||||
[](https://javascript.com/)
|
|
||||||
[](https://jquery.com )
|
|
||||||
[](https://laravel.com)
|
|
||||||
[](https://www.linux.org/)
|
|
||||||
[](https://git.zakscode.com/ztimson/momentum)
|
|
||||||
[](https://www.mongodb.com/)
|
|
||||||
[](https://www.mysql.com/)
|
|
||||||
[](https://nestjs.com/)
|
|
||||||
[](https://dotnet.microsoft.com/)
|
|
||||||
[](https://nextjs.org/)
|
|
||||||
[](https://www.nginx.com/)
|
|
||||||
[](https://nodejs.org/)
|
|
||||||
[](https://p5js.org/)
|
|
||||||
[](https://www.php.net/)
|
|
||||||
[](https://www.postgresql.org/)
|
|
||||||
[](https://www.python.org/)
|
|
||||||
[](https://reactjs.org/)
|
|
||||||
[](https://redis.com/)
|
|
||||||
[](https://sass-lang.com/)
|
|
||||||
[](https://en.wikipedia.org/wiki/Shell_script)
|
|
||||||
[](https://www.microsoft.com/en-ca/sql-server)
|
|
||||||
[](https://www.sqlite.org/index.html)
|
|
||||||
[](https://svelte.dev/)
|
|
||||||
[](https://typescriptlang.org/)
|
|
||||||
[](https://microsoft.com/windows)
|
|
||||||
[](https://vitejs.dev/)
|
|
||||||
[](https://vuejs.org/)
|
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
<details>
|
1. Run the installer:
|
||||||
<summary>
|
|
||||||
<h3 id="production" style="display: inline">
|
|
||||||
Production
|
|
||||||
</h3>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
#### Prerequisites
|
```bash
|
||||||
- [Docker](https://docs.docker.com/install/)
|
curl -fsSL https://git.zakscode.com/ztimson/viator/raw/branch/main/install.sh | sudo bash
|
||||||
|
```
|
||||||
|
|
||||||
#### Instructions
|
2. Choose an installation directory when prompted (defaults to the current working directory).
|
||||||
1. Run the docker image: `docker run -p 80:80 git.zakscode.com/ztimson/template:latest`
|
3. Viator will update the package index, install Git and clone the repository.
|
||||||
2. Open [http://localhost](http://localhost)
|
4. Select and configure the components you want to install.
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>
|
|
||||||
<h3 id="development" style="display: inline">
|
|
||||||
Development
|
|
||||||
</h3>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
#### Prerequisites
|
|
||||||
- [Node.js](https://nodejs.org/en/download)
|
|
||||||
|
|
||||||
#### Instructions
|
|
||||||
1. Install the dependencies: `npm install`
|
|
||||||
2. Start the Angular server: `npm run start`
|
|
||||||
3. Open [http://localhost:4200](http://localhost:4200)
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
Copyright © 2023 Zakary Timson | All Rights Reserved | Available under MIT Licensing
|
|
||||||
|
|
||||||
See the [license](./LICENSE) for more information.
|
Copyright © 2026 Zakary Timson | All Rights Reserved
|
||||||
|
|
||||||
|
See the [LICENSE](./LICENSE) for more information.
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"options": {
|
||||||
|
"paths": {
|
||||||
|
"root": "/data",
|
||||||
|
"styles": "/styles",
|
||||||
|
"fonts": "/usr/src/app/node_modules/tileserver-gl-styles/fonts"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"styles": {
|
||||||
|
"satelite": { "style": "/styles/satellite.json" },
|
||||||
|
"black": { "style": "/styles/black.json" },
|
||||||
|
"contrast": { "style": "/styles/contrast.json" },
|
||||||
|
"dark": { "style": "/styles/dark.json" },
|
||||||
|
"light": { "style": "/styles/light.json" },
|
||||||
|
"white": { "style": "/styles/white.json" }
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"contours": { "mbtiles": "/data/contours_50m.mbtiles" },
|
||||||
|
"osm": { "mbtiles": "/data/osm.mbtiles" },
|
||||||
|
"satellite": { "mbtiles": "/data/satellite-2017.mbtiles" }
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
@@ -0,0 +1,846 @@
|
|||||||
|
{
|
||||||
|
"version": 8,
|
||||||
|
"name": "Blackout",
|
||||||
|
"id": "blackout",
|
||||||
|
"glyphs": "/fonts/{fontstack}/{range}.pbf",
|
||||||
|
"sources": {
|
||||||
|
"osm": {
|
||||||
|
"type": "vector",
|
||||||
|
"url": "mbtiles://osm"
|
||||||
|
},
|
||||||
|
"contours": {
|
||||||
|
"type": "vector",
|
||||||
|
"url": "mbtiles://contours"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"layers": [
|
||||||
|
{
|
||||||
|
"id": "background",
|
||||||
|
"type": "background",
|
||||||
|
"paint": {
|
||||||
|
"background-color": "#0a0a0a"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "landcover",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "landcover",
|
||||||
|
"paint": {
|
||||||
|
"fill-color": [
|
||||||
|
"match",
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"class"
|
||||||
|
],
|
||||||
|
"wood",
|
||||||
|
"#1c231b",
|
||||||
|
"forest",
|
||||||
|
"#1a211a",
|
||||||
|
"grass",
|
||||||
|
"#20281f",
|
||||||
|
"grassland",
|
||||||
|
"#20281f",
|
||||||
|
"scrub",
|
||||||
|
"#232a20",
|
||||||
|
"heath",
|
||||||
|
"#242a21",
|
||||||
|
"wetland",
|
||||||
|
"#1f2826",
|
||||||
|
"farmland",
|
||||||
|
"#1f211c",
|
||||||
|
"ice",
|
||||||
|
"#3a3e3f",
|
||||||
|
"#191c18"
|
||||||
|
],
|
||||||
|
"fill-opacity": 0.9
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "landuse",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "landuse",
|
||||||
|
"paint": {
|
||||||
|
"fill-color": [
|
||||||
|
"match",
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"class"
|
||||||
|
],
|
||||||
|
"residential",
|
||||||
|
"#121212",
|
||||||
|
"commercial",
|
||||||
|
"#1a1716",
|
||||||
|
"industrial",
|
||||||
|
"#181817",
|
||||||
|
"retail",
|
||||||
|
"#1b1716",
|
||||||
|
"military",
|
||||||
|
"#1c1715",
|
||||||
|
"cemetery",
|
||||||
|
"#1c231d",
|
||||||
|
"allotments",
|
||||||
|
"#1d241c",
|
||||||
|
"farmland",
|
||||||
|
"#1f211c",
|
||||||
|
"farmyard",
|
||||||
|
"#1e1f1b",
|
||||||
|
"#121212"
|
||||||
|
],
|
||||||
|
"fill-opacity": 0.8
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "parks",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "park",
|
||||||
|
"paint": {
|
||||||
|
"fill-color": "#1d261d",
|
||||||
|
"fill-opacity": 0.9
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "water",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "water",
|
||||||
|
"paint": {
|
||||||
|
"fill-color": "#1e2832"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "waterways",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "waterway",
|
||||||
|
"minzoom": 5,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#2c4152",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
5,
|
||||||
|
0.4,
|
||||||
|
9,
|
||||||
|
0.8,
|
||||||
|
13,
|
||||||
|
1.6,
|
||||||
|
17,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"line-opacity": 0.95
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "contours-line",
|
||||||
|
"type": "line",
|
||||||
|
"source": "contours",
|
||||||
|
"source-layer": "contour",
|
||||||
|
"minzoom": 10,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#4a4840",
|
||||||
|
"line-opacity": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
10,
|
||||||
|
0.2,
|
||||||
|
14,
|
||||||
|
0.5,
|
||||||
|
18,
|
||||||
|
0.65
|
||||||
|
],
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
10,
|
||||||
|
0.35,
|
||||||
|
14,
|
||||||
|
0.8,
|
||||||
|
18,
|
||||||
|
1.1
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "boundary-admin-minor",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "boundary",
|
||||||
|
"filter": [
|
||||||
|
"all",
|
||||||
|
[
|
||||||
|
"has",
|
||||||
|
"admin_level"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"!=",
|
||||||
|
"admin_level",
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"!=",
|
||||||
|
"admin_level",
|
||||||
|
4
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"!=",
|
||||||
|
"maritime",
|
||||||
|
1
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"minzoom": 5,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#3a3a3c",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
5,
|
||||||
|
0.35,
|
||||||
|
9,
|
||||||
|
0.7,
|
||||||
|
13,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"line-opacity": 0.8,
|
||||||
|
"line-dasharray": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "boundary-state",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "boundary",
|
||||||
|
"filter": [
|
||||||
|
"all",
|
||||||
|
[
|
||||||
|
"==",
|
||||||
|
"admin_level",
|
||||||
|
4
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"!=",
|
||||||
|
"maritime",
|
||||||
|
1
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"minzoom": 2,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#4a4648",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
2,
|
||||||
|
0.4,
|
||||||
|
5,
|
||||||
|
0.8,
|
||||||
|
9,
|
||||||
|
1.4,
|
||||||
|
13,
|
||||||
|
1.8
|
||||||
|
],
|
||||||
|
"line-opacity": 0.9,
|
||||||
|
"line-dasharray": [
|
||||||
|
3,
|
||||||
|
2
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "boundary-country",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "boundary",
|
||||||
|
"filter": [
|
||||||
|
"all",
|
||||||
|
[
|
||||||
|
"==",
|
||||||
|
"admin_level",
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"!=",
|
||||||
|
"maritime",
|
||||||
|
1
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#6a6468",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
0,
|
||||||
|
0.6,
|
||||||
|
4,
|
||||||
|
1.2,
|
||||||
|
7,
|
||||||
|
2,
|
||||||
|
12,
|
||||||
|
2.5
|
||||||
|
],
|
||||||
|
"line-opacity": 0.9
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "aeroway",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "aeroway",
|
||||||
|
"minzoom": 10,
|
||||||
|
"filter": [
|
||||||
|
"in",
|
||||||
|
"class",
|
||||||
|
"runway",
|
||||||
|
"taxiway"
|
||||||
|
],
|
||||||
|
"paint": {
|
||||||
|
"fill-color": "#1e1e20",
|
||||||
|
"fill-outline-color": "#3a3a3c"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-casing",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in",
|
||||||
|
"class",
|
||||||
|
"motorway",
|
||||||
|
"trunk",
|
||||||
|
"primary",
|
||||||
|
"secondary",
|
||||||
|
"tertiary",
|
||||||
|
"minor",
|
||||||
|
"service",
|
||||||
|
"residential"
|
||||||
|
],
|
||||||
|
"minzoom": 5,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#050505",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
5,
|
||||||
|
0.7,
|
||||||
|
8,
|
||||||
|
1.5,
|
||||||
|
12,
|
||||||
|
2.8,
|
||||||
|
16,
|
||||||
|
6.5
|
||||||
|
],
|
||||||
|
"line-opacity": 0.9
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-motorway",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in",
|
||||||
|
"class",
|
||||||
|
"motorway",
|
||||||
|
"trunk"
|
||||||
|
],
|
||||||
|
"minzoom": 5,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#5a504a",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
5,
|
||||||
|
0.7,
|
||||||
|
8,
|
||||||
|
1.5,
|
||||||
|
12,
|
||||||
|
3,
|
||||||
|
16,
|
||||||
|
6
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-primary",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in",
|
||||||
|
"class",
|
||||||
|
"primary",
|
||||||
|
"secondary"
|
||||||
|
],
|
||||||
|
"minzoom": 5,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#4a4440",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
5,
|
||||||
|
0.5,
|
||||||
|
8,
|
||||||
|
1.1,
|
||||||
|
12,
|
||||||
|
2.4,
|
||||||
|
16,
|
||||||
|
4.5
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-tertiary",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in",
|
||||||
|
"class",
|
||||||
|
"tertiary",
|
||||||
|
"minor"
|
||||||
|
],
|
||||||
|
"minzoom": 7,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#3a3838",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
7,
|
||||||
|
0.35,
|
||||||
|
10,
|
||||||
|
0.8,
|
||||||
|
14,
|
||||||
|
1.8,
|
||||||
|
18,
|
||||||
|
3
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-local",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in",
|
||||||
|
"class",
|
||||||
|
"residential",
|
||||||
|
"service",
|
||||||
|
"living_street",
|
||||||
|
"track",
|
||||||
|
"path",
|
||||||
|
"pedestrian",
|
||||||
|
"footway",
|
||||||
|
"cycleway",
|
||||||
|
"bridleway",
|
||||||
|
"steps"
|
||||||
|
],
|
||||||
|
"minzoom": 8,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#2e2d2f",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
8,
|
||||||
|
0.3,
|
||||||
|
11,
|
||||||
|
0.6,
|
||||||
|
14,
|
||||||
|
1.2,
|
||||||
|
18,
|
||||||
|
2.5
|
||||||
|
],
|
||||||
|
"line-opacity": 0.95
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "railways",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in",
|
||||||
|
"class",
|
||||||
|
"rail",
|
||||||
|
"light_rail",
|
||||||
|
"subway",
|
||||||
|
"tram"
|
||||||
|
],
|
||||||
|
"minzoom": 8,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#4a4650",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
8,
|
||||||
|
0.4,
|
||||||
|
12,
|
||||||
|
1,
|
||||||
|
16,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"line-dasharray": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "buildings",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "building",
|
||||||
|
"minzoom": 13,
|
||||||
|
"paint": {
|
||||||
|
"fill-color": "#26262a",
|
||||||
|
"fill-outline-color": "#333336",
|
||||||
|
"fill-opacity": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
13,
|
||||||
|
0.3,
|
||||||
|
15,
|
||||||
|
0.9
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "road-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation_name",
|
||||||
|
"minzoom": 12,
|
||||||
|
"layout": {
|
||||||
|
"symbol-placement": "line",
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name:en"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"text-font": [
|
||||||
|
"Noto Sans Regular"
|
||||||
|
],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
12,
|
||||||
|
9,
|
||||||
|
16,
|
||||||
|
12,
|
||||||
|
20,
|
||||||
|
14
|
||||||
|
],
|
||||||
|
"text-max-angle": 30,
|
||||||
|
"symbol-spacing": 250
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#8a8688",
|
||||||
|
"text-halo-color": "#0a0a0a",
|
||||||
|
"text-halo-width": 1.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "rail-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation_name",
|
||||||
|
"filter": [
|
||||||
|
"in",
|
||||||
|
"class",
|
||||||
|
"rail",
|
||||||
|
"transit"
|
||||||
|
],
|
||||||
|
"minzoom": 13,
|
||||||
|
"layout": {
|
||||||
|
"symbol-placement": "line",
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name:en"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"text-font": [
|
||||||
|
"Noto Sans Regular"
|
||||||
|
],
|
||||||
|
"text-size": 10
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#6a666e",
|
||||||
|
"text-halo-color": "#0a0a0a",
|
||||||
|
"text-halo-width": 1.2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "place-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "place",
|
||||||
|
"minzoom": 2,
|
||||||
|
"filter": [
|
||||||
|
"!=",
|
||||||
|
"class",
|
||||||
|
"continent"
|
||||||
|
],
|
||||||
|
"layout": {
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name:en"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name_en"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"text-font": [
|
||||||
|
"Noto Sans Regular"
|
||||||
|
],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
2,
|
||||||
|
10,
|
||||||
|
6,
|
||||||
|
12,
|
||||||
|
10,
|
||||||
|
14,
|
||||||
|
14,
|
||||||
|
16
|
||||||
|
],
|
||||||
|
"text-max-width": 10
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#a0969a",
|
||||||
|
"text-halo-color": "#0a0a0a",
|
||||||
|
"text-halo-width": 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "poi-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "poi",
|
||||||
|
"minzoom": 14,
|
||||||
|
"layout": {
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name:en"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name_en"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"text-font": [
|
||||||
|
"Noto Sans Regular"
|
||||||
|
],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
14,
|
||||||
|
9,
|
||||||
|
18,
|
||||||
|
12
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#8a8688",
|
||||||
|
"text-halo-color": "#0a0a0a",
|
||||||
|
"text-halo-width": 1.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "airport-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "aerodrome_label",
|
||||||
|
"minzoom": 9,
|
||||||
|
"layout": {
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name:en"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"text-font": [
|
||||||
|
"Noto Sans Regular"
|
||||||
|
],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
9,
|
||||||
|
10,
|
||||||
|
14,
|
||||||
|
13
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#8a8688",
|
||||||
|
"text-halo-color": "#0a0a0a",
|
||||||
|
"text-halo-width": 1.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "house-numbers",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "housenumber",
|
||||||
|
"minzoom": 17,
|
||||||
|
"layout": {
|
||||||
|
"text-field": [
|
||||||
|
"to-string",
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"housenumber"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"text-font": [
|
||||||
|
"Noto Sans Regular"
|
||||||
|
],
|
||||||
|
"text-size": 10
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#6a686a",
|
||||||
|
"text-halo-color": "#0a0a0a",
|
||||||
|
"text-halo-width": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,515 @@
|
|||||||
|
{
|
||||||
|
"version": 8,
|
||||||
|
"name": "High Contrast",
|
||||||
|
"id": "high-contrast",
|
||||||
|
"glyphs": "/fonts/{fontstack}/{range}.pbf",
|
||||||
|
"sources": {
|
||||||
|
"osm": {
|
||||||
|
"type": "vector",
|
||||||
|
"url": "mbtiles://osm"
|
||||||
|
},
|
||||||
|
"contours": {
|
||||||
|
"type": "vector",
|
||||||
|
"url": "mbtiles://contours"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"layers": [
|
||||||
|
{
|
||||||
|
"id": "background",
|
||||||
|
"type": "background",
|
||||||
|
"paint": {
|
||||||
|
"background-color": "#ffffff"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "landcover",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "landcover",
|
||||||
|
"paint": {
|
||||||
|
"fill-color": [
|
||||||
|
"match", ["get", "class"],
|
||||||
|
"wood", "#e5e5e5",
|
||||||
|
"forest", "#e5e5e5",
|
||||||
|
"grass", "#f5f5f5",
|
||||||
|
"grassland", "#f5f5f5",
|
||||||
|
"scrub", "#eeeeee",
|
||||||
|
"heath", "#eeeeee",
|
||||||
|
"wetland", "#ededed",
|
||||||
|
"farmland", "#f8f8f8",
|
||||||
|
"ice", "#ffffff",
|
||||||
|
"#f4f4f4"
|
||||||
|
],
|
||||||
|
"fill-opacity": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "landuse",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "landuse",
|
||||||
|
"paint": {
|
||||||
|
"fill-color": [
|
||||||
|
"match", ["get", "class"],
|
||||||
|
"military", "#e8e8e8",
|
||||||
|
"industrial", "#eeeeee",
|
||||||
|
"commercial", "#f0f0f0",
|
||||||
|
"retail", "#f0f0f0",
|
||||||
|
"cemetery", "#e9e9e9",
|
||||||
|
"allotments", "#eeeeee",
|
||||||
|
"farmland", "#f8f8f8",
|
||||||
|
"farmyard", "#f8f8f8",
|
||||||
|
"residential", "#ffffff",
|
||||||
|
"#ffffff"
|
||||||
|
],
|
||||||
|
"fill-outline-color": "#d0d0d0",
|
||||||
|
"fill-opacity": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "parks",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "park",
|
||||||
|
"paint": {
|
||||||
|
"fill-color": "#eeeeee",
|
||||||
|
"fill-outline-color": "#b0b0b0",
|
||||||
|
"fill-opacity": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "water",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "water",
|
||||||
|
"paint": {
|
||||||
|
"fill-color": "#e5e5e5",
|
||||||
|
"fill-outline-color": "#777777"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "waterways",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "waterway",
|
||||||
|
"minzoom": 5,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#777777",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
5, 0.5, 9, 0.9, 13, 1.6, 17, 3.5
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "contours-line",
|
||||||
|
"type": "line",
|
||||||
|
"source": "contours",
|
||||||
|
"source-layer": "contour",
|
||||||
|
"minzoom": 10,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#888888",
|
||||||
|
"line-opacity": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
10, 0.45, 14, 0.7, 18, 0.85
|
||||||
|
],
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
10, 0.35, 14, 0.65, 18, 0.9
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "boundary-admin-minor",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "boundary",
|
||||||
|
"filter": [
|
||||||
|
"all",
|
||||||
|
["has", "admin_level"],
|
||||||
|
["!=", "admin_level", 2],
|
||||||
|
["!=", "admin_level", 4],
|
||||||
|
["!=", "maritime", 1]
|
||||||
|
],
|
||||||
|
"minzoom": 5,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#888888",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
5, 0.45, 9, 0.7, 13, 1
|
||||||
|
],
|
||||||
|
"line-opacity": 1,
|
||||||
|
"line-dasharray": [2, 2]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "boundary-state",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "boundary",
|
||||||
|
"filter": [
|
||||||
|
"all",
|
||||||
|
["==", "admin_level", 4],
|
||||||
|
["!=", "maritime", 1]
|
||||||
|
],
|
||||||
|
"minzoom": 2,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#555555",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
2, 0.6, 5, 0.9, 9, 1.3, 13, 1.8
|
||||||
|
],
|
||||||
|
"line-opacity": 1,
|
||||||
|
"line-dasharray": [4, 2]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "boundary-country",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "boundary",
|
||||||
|
"filter": [
|
||||||
|
"all",
|
||||||
|
["==", "admin_level", 2],
|
||||||
|
["!=", "maritime", 1]
|
||||||
|
],
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#111111",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
0, 0.8, 4, 1.4, 7, 2, 12, 2.6
|
||||||
|
],
|
||||||
|
"line-opacity": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "aeroway",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "aeroway",
|
||||||
|
"minzoom": 10,
|
||||||
|
"filter": ["in", "class", "runway", "taxiway"],
|
||||||
|
"paint": {
|
||||||
|
"fill-color": "#dedede",
|
||||||
|
"fill-outline-color": "#555555"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-casing-minor",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in", "class",
|
||||||
|
"minor", "service", "residential", "living_street"
|
||||||
|
],
|
||||||
|
"minzoom": 11,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#999999",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
11, 0.6, 14, 2, 16, 3.6, 18, 6
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-casing",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in", "class",
|
||||||
|
"motorway", "trunk", "primary", "secondary", "tertiary"
|
||||||
|
],
|
||||||
|
"minzoom": 5,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#333333",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
5, 1, 8, 1.8, 12, 3, 16, 7
|
||||||
|
],
|
||||||
|
"line-opacity": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-motorway",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": ["in", "class", "motorway", "trunk"],
|
||||||
|
"minzoom": 5,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#ffffff",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
5, 0.5, 8, 1.1, 12, 2.2, 16, 5
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-primary",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": ["in", "class", "primary", "secondary"],
|
||||||
|
"minzoom": 5,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#ffffff",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
5, 0.35, 8, 0.9, 12, 2, 16, 4
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-tertiary",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": ["==", "class", "tertiary"],
|
||||||
|
"minzoom": 7,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#ffffff",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
7, 0.3, 10, 0.7, 14, 1.8, 18, 3.5
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-minor",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in", "class",
|
||||||
|
"minor", "service", "residential", "living_street"
|
||||||
|
],
|
||||||
|
"minzoom": 11,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#ffffff",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
11, 0.3, 14, 1.1, 16, 2.2, 18, 4
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-path",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in", "class",
|
||||||
|
"path", "track", "pedestrian", "footway",
|
||||||
|
"cycleway", "bridleway", "steps"
|
||||||
|
],
|
||||||
|
"minzoom": 13,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "butt",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#808080",
|
||||||
|
"line-opacity": 0.85,
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
13, 0.3, 15, 0.5, 18, 1
|
||||||
|
],
|
||||||
|
"line-dasharray": [3, 2]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "railways",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": ["in", "class", "rail", "light_rail", "subway", "tram"],
|
||||||
|
"minzoom": 8,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#333333",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
8, 0.5, 12, 1, 16, 1.8
|
||||||
|
],
|
||||||
|
"line-dasharray": [2, 1]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "buildings",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "building",
|
||||||
|
"minzoom": 13,
|
||||||
|
"paint": {
|
||||||
|
"fill-color": "#e5e5e5",
|
||||||
|
"fill-outline-color": "#777777",
|
||||||
|
"fill-opacity": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
13, 0.5, 15, 1
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "road-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation_name",
|
||||||
|
"minzoom": 12,
|
||||||
|
"layout": {
|
||||||
|
"symbol-placement": "line",
|
||||||
|
"text-field": [
|
||||||
|
"coalesce", ["get", "name:en"], ["get", "name"]
|
||||||
|
],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
12, 10, 16, 12, 20, 14
|
||||||
|
],
|
||||||
|
"text-max-angle": 30,
|
||||||
|
"symbol-spacing": 250
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#111111",
|
||||||
|
"text-halo-color": "#ffffff",
|
||||||
|
"text-halo-width": 1.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "rail-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation_name",
|
||||||
|
"filter": ["in", "class", "rail", "transit"],
|
||||||
|
"minzoom": 13,
|
||||||
|
"layout": {
|
||||||
|
"symbol-placement": "line",
|
||||||
|
"text-field": [
|
||||||
|
"coalesce", ["get", "name:en"], ["get", "name"]
|
||||||
|
],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": 10
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#222222",
|
||||||
|
"text-halo-color": "#ffffff",
|
||||||
|
"text-halo-width": 1.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "place-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "place",
|
||||||
|
"minzoom": 2,
|
||||||
|
"filter": ["!=", "class", "continent"],
|
||||||
|
"layout": {
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
["get", "name:en"],
|
||||||
|
["get", "name_en"],
|
||||||
|
["get", "name"]
|
||||||
|
],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
2, 10, 6, 12, 10, 14, 14, 16
|
||||||
|
],
|
||||||
|
"text-max-width": 10
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#111111",
|
||||||
|
"text-halo-color": "#ffffff",
|
||||||
|
"text-halo-width": 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "poi-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "poi",
|
||||||
|
"minzoom": 14,
|
||||||
|
"layout": {
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
["get", "name:en"],
|
||||||
|
["get", "name_en"],
|
||||||
|
["get", "name"]
|
||||||
|
],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
14, 9, 18, 12
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#111111",
|
||||||
|
"text-halo-color": "#ffffff",
|
||||||
|
"text-halo-width": 1.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "airport-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "aerodrome_label",
|
||||||
|
"minzoom": 9,
|
||||||
|
"layout": {
|
||||||
|
"text-field": [
|
||||||
|
"coalesce", ["get", "name:en"], ["get", "name"]
|
||||||
|
],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
9, 10, 14, 13
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#111111",
|
||||||
|
"text-halo-color": "#ffffff",
|
||||||
|
"text-halo-width": 1.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "house-numbers",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "housenumber",
|
||||||
|
"minzoom": 17,
|
||||||
|
"layout": {
|
||||||
|
"text-field": ["to-string", ["get", "housenumber"]],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": 10
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#222222",
|
||||||
|
"text-halo-color": "#ffffff",
|
||||||
|
"text-halo-width": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,534 @@
|
|||||||
|
{
|
||||||
|
"version": 8,
|
||||||
|
"name": "Dark Topographic",
|
||||||
|
"id": "dark-matter-basic",
|
||||||
|
"glyphs": "/fonts/{fontstack}/{range}.pbf",
|
||||||
|
"sources": {
|
||||||
|
"osm": {
|
||||||
|
"type": "vector",
|
||||||
|
"url": "mbtiles://osm"
|
||||||
|
},
|
||||||
|
"contours": {
|
||||||
|
"type": "vector",
|
||||||
|
"url": "mbtiles://contours"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"layers": [
|
||||||
|
{
|
||||||
|
"id": "background",
|
||||||
|
"type": "background",
|
||||||
|
"paint": {
|
||||||
|
"background-color": "#202722"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "landcover",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "landcover",
|
||||||
|
"paint": {
|
||||||
|
"fill-color": [
|
||||||
|
"match", ["get", "class"],
|
||||||
|
"wood", "#304b37",
|
||||||
|
"forest", "#294631",
|
||||||
|
"grass", "#394b35",
|
||||||
|
"grassland", "#394b35",
|
||||||
|
"scrub", "#46513a",
|
||||||
|
"heath", "#4a503b",
|
||||||
|
"wetland", "#354b42",
|
||||||
|
"farmland", "#4b4b38",
|
||||||
|
"ice", "#626e70",
|
||||||
|
"#343c34"
|
||||||
|
],
|
||||||
|
"fill-opacity": 0.9
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "landuse",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "landuse",
|
||||||
|
"paint": {
|
||||||
|
"fill-color": [
|
||||||
|
"match", ["get", "class"],
|
||||||
|
"residential", "#303632",
|
||||||
|
"commercial", "#3d3432",
|
||||||
|
"industrial", "#383735",
|
||||||
|
"retail", "#403432",
|
||||||
|
"military", "#403331",
|
||||||
|
"cemetery", "#304235",
|
||||||
|
"allotments", "#344533",
|
||||||
|
"farmland", "#4b4b38",
|
||||||
|
"farmyard", "#454537",
|
||||||
|
"#303632"
|
||||||
|
],
|
||||||
|
"fill-opacity": 0.8
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "parks",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "park",
|
||||||
|
"paint": {
|
||||||
|
"fill-color": "#304b37",
|
||||||
|
"fill-opacity": 0.9
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "water",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "water",
|
||||||
|
"paint": {
|
||||||
|
"fill-color": "#233f50"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "waterways",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "waterway",
|
||||||
|
"minzoom": 5,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#426e86",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
5, 0.4,
|
||||||
|
9, 0.8,
|
||||||
|
13, 1.6,
|
||||||
|
17, 4
|
||||||
|
],
|
||||||
|
"line-opacity": 0.95
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "contours-line",
|
||||||
|
"type": "line",
|
||||||
|
"source": "contours",
|
||||||
|
"source-layer": "contour",
|
||||||
|
"minzoom": 10,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#827d65",
|
||||||
|
"line-opacity": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
10, 0.2,
|
||||||
|
14, 0.5,
|
||||||
|
18, 0.65
|
||||||
|
],
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
10, 0.35,
|
||||||
|
14, 0.8,
|
||||||
|
18, 1.1
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "boundary-admin-minor",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "boundary",
|
||||||
|
"filter": [
|
||||||
|
"all",
|
||||||
|
["has", "admin_level"],
|
||||||
|
["!=", "admin_level", 2],
|
||||||
|
["!=", "admin_level", 4],
|
||||||
|
["!=", "maritime", 1]
|
||||||
|
],
|
||||||
|
"minzoom": 5,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#59635d",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
5, 0.35,
|
||||||
|
9, 0.7,
|
||||||
|
13, 1
|
||||||
|
],
|
||||||
|
"line-opacity": 0.8,
|
||||||
|
"line-dasharray": [2, 2]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "boundary-state",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "boundary",
|
||||||
|
"filter": [
|
||||||
|
"all",
|
||||||
|
["==", "admin_level", 4],
|
||||||
|
["!=", "maritime", 1]
|
||||||
|
],
|
||||||
|
"minzoom": 2,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#747c73",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
2, 0.4,
|
||||||
|
5, 0.8,
|
||||||
|
9, 1.4,
|
||||||
|
13, 1.8
|
||||||
|
],
|
||||||
|
"line-opacity": 0.9,
|
||||||
|
"line-dasharray": [3, 2]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "boundary-country",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "boundary",
|
||||||
|
"filter": [
|
||||||
|
"all",
|
||||||
|
["==", "admin_level", 2],
|
||||||
|
["!=", "maritime", 1]
|
||||||
|
],
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#9b9d8c",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
0, 0.6,
|
||||||
|
4, 1.2,
|
||||||
|
7, 2,
|
||||||
|
12, 2.5
|
||||||
|
],
|
||||||
|
"line-opacity": 0.9
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "aeroway",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "aeroway",
|
||||||
|
"minzoom": 10,
|
||||||
|
"filter": [
|
||||||
|
"in", "class", "runway", "taxiway"
|
||||||
|
],
|
||||||
|
"paint": {
|
||||||
|
"fill-color": "#454b4a",
|
||||||
|
"fill-outline-color": "#646c68"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-casing",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in", "class",
|
||||||
|
"motorway", "trunk", "primary",
|
||||||
|
"secondary", "tertiary", "minor",
|
||||||
|
"service", "residential"
|
||||||
|
],
|
||||||
|
"minzoom": 5,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#171c19",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
5, 0.7,
|
||||||
|
8, 1.5,
|
||||||
|
12, 2.8,
|
||||||
|
16, 6.5
|
||||||
|
],
|
||||||
|
"line-opacity": 0.9
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-motorway",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in", "class", "motorway", "trunk"
|
||||||
|
],
|
||||||
|
"minzoom": 5,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#9a7c5c",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
5, 0.7,
|
||||||
|
8, 1.5,
|
||||||
|
12, 3,
|
||||||
|
16, 6
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-primary",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in", "class", "primary", "secondary"
|
||||||
|
],
|
||||||
|
"minzoom": 5,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#857a63",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
5, 0.5,
|
||||||
|
8, 1.1,
|
||||||
|
12, 2.4,
|
||||||
|
16, 4.5
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-tertiary",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in", "class", "tertiary", "minor"
|
||||||
|
],
|
||||||
|
"minzoom": 7,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#636a61",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
7, 0.35,
|
||||||
|
10, 0.8,
|
||||||
|
14, 1.8,
|
||||||
|
18, 3
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-local",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in", "class",
|
||||||
|
"residential", "service", "living_street",
|
||||||
|
"track", "path", "pedestrian", "footway",
|
||||||
|
"cycleway", "bridleway", "steps"
|
||||||
|
],
|
||||||
|
"minzoom": 8,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#4f574f",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
8, 0.3,
|
||||||
|
11, 0.6,
|
||||||
|
14, 1.2,
|
||||||
|
18, 2.5
|
||||||
|
],
|
||||||
|
"line-opacity": 0.95
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "railways",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in", "class", "rail", "light_rail", "subway", "tram"
|
||||||
|
],
|
||||||
|
"minzoom": 8,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#a394b5",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
8, 0.4,
|
||||||
|
12, 1,
|
||||||
|
16, 2
|
||||||
|
],
|
||||||
|
"line-dasharray": [2, 1]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "buildings",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "building",
|
||||||
|
"minzoom": 13,
|
||||||
|
"paint": {
|
||||||
|
"fill-color": "#424943",
|
||||||
|
"fill-outline-color": "#596158",
|
||||||
|
"fill-opacity": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
13, 0.3,
|
||||||
|
15, 0.9
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "road-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation_name",
|
||||||
|
"minzoom": 12,
|
||||||
|
"layout": {
|
||||||
|
"symbol-placement": "line",
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
["get", "name:en"],
|
||||||
|
["get", "name"]
|
||||||
|
],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
12, 9,
|
||||||
|
16, 12,
|
||||||
|
20, 14
|
||||||
|
],
|
||||||
|
"text-max-angle": 30,
|
||||||
|
"symbol-spacing": 250
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#d4d5c9",
|
||||||
|
"text-halo-color": "#252c27",
|
||||||
|
"text-halo-width": 1.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "rail-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation_name",
|
||||||
|
"filter": [
|
||||||
|
"in", "class", "rail", "transit"
|
||||||
|
],
|
||||||
|
"minzoom": 13,
|
||||||
|
"layout": {
|
||||||
|
"symbol-placement": "line",
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
["get", "name:en"],
|
||||||
|
["get", "name"]
|
||||||
|
],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": 10
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#b8a9c6",
|
||||||
|
"text-halo-color": "#252c27",
|
||||||
|
"text-halo-width": 1.2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "place-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "place",
|
||||||
|
"minzoom": 2,
|
||||||
|
"filter": [
|
||||||
|
"!=", "class", "continent"
|
||||||
|
],
|
||||||
|
"layout": {
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
["get", "name:en"],
|
||||||
|
["get", "name_en"],
|
||||||
|
["get", "name"]
|
||||||
|
],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
2, 10,
|
||||||
|
6, 12,
|
||||||
|
10, 14,
|
||||||
|
14, 16
|
||||||
|
],
|
||||||
|
"text-max-width": 10
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#e0e0d5",
|
||||||
|
"text-halo-color": "#252c27",
|
||||||
|
"text-halo-width": 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "poi-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "poi",
|
||||||
|
"minzoom": 14,
|
||||||
|
"layout": {
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
["get", "name:en"],
|
||||||
|
["get", "name_en"],
|
||||||
|
["get", "name"]
|
||||||
|
],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
14, 9,
|
||||||
|
18, 12
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#d6d8ce",
|
||||||
|
"text-halo-color": "#252c27",
|
||||||
|
"text-halo-width": 1.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "airport-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "aerodrome_label",
|
||||||
|
"minzoom": 9,
|
||||||
|
"layout": {
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
["get", "name:en"],
|
||||||
|
["get", "name"]
|
||||||
|
],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
9, 10,
|
||||||
|
14, 13
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#d6d8ce",
|
||||||
|
"text-halo-color": "#252c27",
|
||||||
|
"text-halo-width": 1.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "house-numbers",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "housenumber",
|
||||||
|
"minzoom": 17,
|
||||||
|
"layout": {
|
||||||
|
"text-field": [
|
||||||
|
"to-string",
|
||||||
|
["get", "housenumber"]
|
||||||
|
],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": 10
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#b5b7ad",
|
||||||
|
"text-halo-color": "#252c27",
|
||||||
|
"text-halo-width": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,535 @@
|
|||||||
|
|
||||||
|
{
|
||||||
|
"version": 8,
|
||||||
|
"name": "Light Topographic",
|
||||||
|
"id": "light-matter-basic",
|
||||||
|
"glyphs": "/fonts/{fontstack}/{range}.pbf",
|
||||||
|
"sources": {
|
||||||
|
"osm": {
|
||||||
|
"type": "vector",
|
||||||
|
"url": "mbtiles://osm"
|
||||||
|
},
|
||||||
|
"contours": {
|
||||||
|
"type": "vector",
|
||||||
|
"url": "mbtiles://contours"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"layers": [
|
||||||
|
{
|
||||||
|
"id": "background",
|
||||||
|
"type": "background",
|
||||||
|
"paint": {
|
||||||
|
"background-color": "#f0eee6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "landcover",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "landcover",
|
||||||
|
"paint": {
|
||||||
|
"fill-color": [
|
||||||
|
"match", ["get", "class"],
|
||||||
|
"wood", "#c1d5ae",
|
||||||
|
"forest", "#b8d1a6",
|
||||||
|
"grass", "#dce7c9",
|
||||||
|
"grassland", "#dce7c9",
|
||||||
|
"scrub", "#d2dfb9",
|
||||||
|
"heath", "#d8dfbf",
|
||||||
|
"wetland", "#d4dfc3",
|
||||||
|
"farmland", "#e8e2c9",
|
||||||
|
"ice", "#f5f5f0",
|
||||||
|
"#e8e5d9"
|
||||||
|
],
|
||||||
|
"fill-opacity": 0.8
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "landuse",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "landuse",
|
||||||
|
"paint": {
|
||||||
|
"fill-color": [
|
||||||
|
"match", ["get", "class"],
|
||||||
|
"residential", "#e9e5dc",
|
||||||
|
"commercial", "#eadfd5",
|
||||||
|
"industrial", "#e4dfd9",
|
||||||
|
"retail", "#eee0d7",
|
||||||
|
"military", "#e6d9d0",
|
||||||
|
"cemetery", "#d4dfc8",
|
||||||
|
"allotments", "#d7e4c5",
|
||||||
|
"farmland", "#e8e2c9",
|
||||||
|
"farmyard", "#e8e2c9",
|
||||||
|
"#e9e5dc"
|
||||||
|
],
|
||||||
|
"fill-opacity": 0.65
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "parks",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "park",
|
||||||
|
"paint": {
|
||||||
|
"fill-color": "#c9dfb6",
|
||||||
|
"fill-opacity": 0.85
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "water",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "water",
|
||||||
|
"paint": {
|
||||||
|
"fill-color": "#a9d0e4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "waterways",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "waterway",
|
||||||
|
"minzoom": 5,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#91c5df",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
5, 0.3,
|
||||||
|
9, 0.7,
|
||||||
|
13, 1.5,
|
||||||
|
17, 4
|
||||||
|
],
|
||||||
|
"line-opacity": 0.9
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "contours-line",
|
||||||
|
"type": "line",
|
||||||
|
"source": "contours",
|
||||||
|
"source-layer": "contour",
|
||||||
|
"minzoom": 10,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#b5a48c",
|
||||||
|
"line-opacity": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
10, 0.2,
|
||||||
|
14, 0.55,
|
||||||
|
18, 0.7
|
||||||
|
],
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
10, 0.35,
|
||||||
|
14, 0.8,
|
||||||
|
18, 1.1
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "boundary-admin-minor",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "boundary",
|
||||||
|
"filter": [
|
||||||
|
"all",
|
||||||
|
["has", "admin_level"],
|
||||||
|
["!=", "admin_level", 2],
|
||||||
|
["!=", "admin_level", 4],
|
||||||
|
["!=", "maritime", 1]
|
||||||
|
],
|
||||||
|
"minzoom": 5,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#bdb4ac",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
5, 0.35,
|
||||||
|
9, 0.7,
|
||||||
|
13, 1
|
||||||
|
],
|
||||||
|
"line-opacity": 0.75,
|
||||||
|
"line-dasharray": [2, 2]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "boundary-state",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "boundary",
|
||||||
|
"filter": [
|
||||||
|
"all",
|
||||||
|
["==", "admin_level", 4],
|
||||||
|
["!=", "maritime", 1]
|
||||||
|
],
|
||||||
|
"minzoom": 2,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#a69b92",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
2, 0.4,
|
||||||
|
5, 0.8,
|
||||||
|
9, 1.4,
|
||||||
|
13, 1.8
|
||||||
|
],
|
||||||
|
"line-opacity": 0.85,
|
||||||
|
"line-dasharray": [3, 2]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "boundary-country",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "boundary",
|
||||||
|
"filter": [
|
||||||
|
"all",
|
||||||
|
["==", "admin_level", 2],
|
||||||
|
["!=", "maritime", 1]
|
||||||
|
],
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#8f8178",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
0, 0.6,
|
||||||
|
4, 1.2,
|
||||||
|
7, 2,
|
||||||
|
12, 2.5
|
||||||
|
],
|
||||||
|
"line-opacity": 0.9
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "aeroway",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "aeroway",
|
||||||
|
"minzoom": 10,
|
||||||
|
"filter": [
|
||||||
|
"in", "class", "runway", "taxiway"
|
||||||
|
],
|
||||||
|
"paint": {
|
||||||
|
"fill-color": "#d0c9bd",
|
||||||
|
"fill-outline-color": "#b4aa9c"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-casing",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in", "class",
|
||||||
|
"motorway", "trunk", "primary",
|
||||||
|
"secondary", "tertiary", "minor",
|
||||||
|
"service", "residential"
|
||||||
|
],
|
||||||
|
"minzoom": 5,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#d0c5b4",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
5, 0.5,
|
||||||
|
8, 1.2,
|
||||||
|
12, 2.2,
|
||||||
|
16, 6
|
||||||
|
],
|
||||||
|
"line-opacity": 0.9
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-motorway",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in", "class", "motorway", "trunk"
|
||||||
|
],
|
||||||
|
"minzoom": 5,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#e8ad76",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
5, 0.7,
|
||||||
|
8, 1.5,
|
||||||
|
12, 3,
|
||||||
|
16, 6
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-primary",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in", "class", "primary", "secondary"
|
||||||
|
],
|
||||||
|
"minzoom": 5,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#f2d29a",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
5, 0.5,
|
||||||
|
8, 1.1,
|
||||||
|
12, 2.4,
|
||||||
|
16, 4.5
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-tertiary",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in", "class", "tertiary", "minor"
|
||||||
|
],
|
||||||
|
"minzoom": 7,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#fffdf7",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
7, 0.35,
|
||||||
|
10, 0.8,
|
||||||
|
14, 1.8,
|
||||||
|
18, 3
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-local",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in", "class",
|
||||||
|
"residential", "service", "living_street",
|
||||||
|
"track", "path", "pedestrian", "footway",
|
||||||
|
"cycleway", "bridleway", "steps"
|
||||||
|
],
|
||||||
|
"minzoom": 8,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#fffdf7",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
8, 0.3,
|
||||||
|
11, 0.6,
|
||||||
|
14, 1.2,
|
||||||
|
18, 2.5
|
||||||
|
],
|
||||||
|
"line-opacity": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "railways",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in", "class", "rail", "light_rail", "subway", "tram"
|
||||||
|
],
|
||||||
|
"minzoom": 8,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#9e91a6",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
8, 0.4,
|
||||||
|
12, 1,
|
||||||
|
16, 2
|
||||||
|
],
|
||||||
|
"line-dasharray": [2, 1]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "buildings",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "building",
|
||||||
|
"minzoom": 13,
|
||||||
|
"paint": {
|
||||||
|
"fill-color": "#ded5c6",
|
||||||
|
"fill-outline-color": "#c9bca9",
|
||||||
|
"fill-opacity": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
13, 0.3,
|
||||||
|
15, 0.9
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "road-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation_name",
|
||||||
|
"minzoom": 12,
|
||||||
|
"layout": {
|
||||||
|
"symbol-placement": "line",
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
["get", "name:en"],
|
||||||
|
["get", "name"]
|
||||||
|
],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
12, 9,
|
||||||
|
16, 12,
|
||||||
|
20, 14
|
||||||
|
],
|
||||||
|
"text-max-angle": 30,
|
||||||
|
"symbol-spacing": 250
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#655d53",
|
||||||
|
"text-halo-color": "#f7f5ee",
|
||||||
|
"text-halo-width": 1.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "rail-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation_name",
|
||||||
|
"filter": [
|
||||||
|
"in", "class", "rail", "transit"
|
||||||
|
],
|
||||||
|
"minzoom": 13,
|
||||||
|
"layout": {
|
||||||
|
"symbol-placement": "line",
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
["get", "name:en"],
|
||||||
|
["get", "name"]
|
||||||
|
],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": 10
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#786a82",
|
||||||
|
"text-halo-color": "#f7f5ee",
|
||||||
|
"text-halo-width": 1.2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "place-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "place",
|
||||||
|
"minzoom": 2,
|
||||||
|
"filter": [
|
||||||
|
"!=", "class", "continent"
|
||||||
|
],
|
||||||
|
"layout": {
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
["get", "name:en"],
|
||||||
|
["get", "name_en"],
|
||||||
|
["get", "name"]
|
||||||
|
],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
2, 10,
|
||||||
|
6, 12,
|
||||||
|
10, 14,
|
||||||
|
14, 16
|
||||||
|
],
|
||||||
|
"text-max-width": 10
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#514a42",
|
||||||
|
"text-halo-color": "#f7f5ee",
|
||||||
|
"text-halo-width": 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "poi-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "poi",
|
||||||
|
"minzoom": 14,
|
||||||
|
"layout": {
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
["get", "name:en"],
|
||||||
|
["get", "name_en"],
|
||||||
|
["get", "name"]
|
||||||
|
],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
14, 9,
|
||||||
|
18, 12
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#514a42",
|
||||||
|
"text-halo-color": "#f7f5ee",
|
||||||
|
"text-halo-width": 1.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "airport-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "aerodrome_label",
|
||||||
|
"minzoom": 9,
|
||||||
|
"layout": {
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
["get", "name:en"],
|
||||||
|
["get", "name"]
|
||||||
|
],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
9, 10,
|
||||||
|
14, 13
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#514a42",
|
||||||
|
"text-halo-color": "#f7f5ee",
|
||||||
|
"text-halo-width": 1.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "house-numbers",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "housenumber",
|
||||||
|
"minzoom": 17,
|
||||||
|
"layout": {
|
||||||
|
"text-field": [
|
||||||
|
"to-string",
|
||||||
|
["get", "housenumber"]
|
||||||
|
],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": 10
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#71685e",
|
||||||
|
"text-halo-color": "#ffffff",
|
||||||
|
"text-halo-width": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,289 @@
|
|||||||
|
{
|
||||||
|
"version": 8,
|
||||||
|
"name": "Satellite",
|
||||||
|
"id": "satellite",
|
||||||
|
"sources": {
|
||||||
|
"satellite": {
|
||||||
|
"type": "raster",
|
||||||
|
"url": "mbtiles://satellite"
|
||||||
|
},
|
||||||
|
"osm": {
|
||||||
|
"type": "vector",
|
||||||
|
"url": "mbtiles://osm"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"glyphs": "/fonts/{fontstack}/{range}.pbf",
|
||||||
|
"layers": [
|
||||||
|
{
|
||||||
|
"id": "satellite-raster",
|
||||||
|
"type": "raster",
|
||||||
|
"source": "satellite",
|
||||||
|
"paint": {
|
||||||
|
"raster-opacity": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-small",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": ["in", "class", "residential", "service", "track", "path"],
|
||||||
|
"minzoom": 5,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#ddd",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
5, 0.15,
|
||||||
|
7, 0.25,
|
||||||
|
12, 0.6,
|
||||||
|
16, 1
|
||||||
|
],
|
||||||
|
"line-opacity": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
5, 0.1,
|
||||||
|
7, 0.2,
|
||||||
|
12, 0.6
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-local",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": ["==", "class", "minor"],
|
||||||
|
"minzoom": 6,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#ddd",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
6, 0.15,
|
||||||
|
8, 0.3,
|
||||||
|
12, 0.8,
|
||||||
|
16, 1.2
|
||||||
|
],
|
||||||
|
"line-opacity": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
6, 0.1,
|
||||||
|
8, 0.3,
|
||||||
|
12, 0.6
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-primary",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": ["in", "class", "primary", "secondary"],
|
||||||
|
"minzoom": 7,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#eee",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
7, 0.3,
|
||||||
|
12, 1.5,
|
||||||
|
16, 3
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-motorway",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": ["in", "class", "motorway", "trunk"],
|
||||||
|
"minzoom": 6,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#fff",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
6, 0.5,
|
||||||
|
10, 2,
|
||||||
|
14, 5
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "boundary-country",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "boundary",
|
||||||
|
"filter": ["all", ["==", "admin_level", 2], ["!=", "maritime", 1]],
|
||||||
|
"paint": {
|
||||||
|
"line-color": "hsl(0, 0%, 60%)",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
0, 0.5,
|
||||||
|
4, 1.5,
|
||||||
|
6, 2
|
||||||
|
],
|
||||||
|
"line-opacity": 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "boundary-state",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "boundary",
|
||||||
|
"filter": ["all", ["==", "admin_level", 4], ["!=", "maritime", 1]],
|
||||||
|
"minzoom": 2,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "hsla(0, 0%, 60%, 0.5)",
|
||||||
|
"line-dasharray": [2, 1],
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
2, 0.5,
|
||||||
|
5, 1,
|
||||||
|
8, 2
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "boundary-local",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "boundary",
|
||||||
|
"filter": ["all", ["==", "admin_level", 6], ["!=", "maritime", 1]],
|
||||||
|
"minzoom": 6,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#bbbbbb",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
6, 0.5,
|
||||||
|
10, 1.2
|
||||||
|
],
|
||||||
|
"line-opacity": 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "buildings",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "building",
|
||||||
|
"minzoom": 14,
|
||||||
|
"paint": {
|
||||||
|
"fill-color": "rgba(222, 211, 190, 1)",
|
||||||
|
"fill-opacity": { "base": 1, "stops": [[13, 0], [15, 1]] }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "house-numbers",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "housenumber",
|
||||||
|
"minzoom": 15,
|
||||||
|
"layout": {
|
||||||
|
"text-field": "{housenumber}",
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
15, 10,
|
||||||
|
29, 14
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "rgba(100,100,100,0.75)",
|
||||||
|
"text-halo-color": "rgba(255,255,255,0.6)",
|
||||||
|
"text-halo-width": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "road-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation_name",
|
||||||
|
"minzoom": 13,
|
||||||
|
"layout": {
|
||||||
|
"symbol-placement": "line",
|
||||||
|
"text-field": ["coalesce", ["get", "name:en"], ["get", "name"]],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
13, 10,
|
||||||
|
16, 14
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#444",
|
||||||
|
"text-halo-color": "#ffffff",
|
||||||
|
"text-halo-width": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "rail-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": ["==", "class", "rail"],
|
||||||
|
"minzoom": 14,
|
||||||
|
"layout": {
|
||||||
|
"symbol-placement": "line",
|
||||||
|
"text-field": ["coalesce", ["get", "name:en"], ["get", "name"]],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": 11
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#444",
|
||||||
|
"text-halo-color": "rgba(255,255,255,0.6)",
|
||||||
|
"text-halo-width": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "airport-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "aeroway",
|
||||||
|
"minzoom": 14,
|
||||||
|
"layout": {
|
||||||
|
"text-field": ["coalesce", ["get", "name:en"], ["get", "name"]],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": 12
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#444",
|
||||||
|
"text-halo-color": "rgba(255,255,255,0.6)",
|
||||||
|
"text-halo-width": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "poi-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "poi",
|
||||||
|
"minzoom": 14,
|
||||||
|
"layout": {
|
||||||
|
"text-field": ["coalesce", ["get", "name:en"], ["get", "name_en"], ["get", "name"]],
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate", ["linear"], ["zoom"],
|
||||||
|
14, 9,
|
||||||
|
18, 13
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#444",
|
||||||
|
"text-halo-color": "rgba(255,255,255,0.6)",
|
||||||
|
"text-halo-width": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "places",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "place",
|
||||||
|
"minzoom": 2,
|
||||||
|
"filter": ["!=", "class", "continent"],
|
||||||
|
"layout": {
|
||||||
|
"text-size": 12,
|
||||||
|
"text-font": ["Noto Sans Regular"],
|
||||||
|
"text-field": ["coalesce", ["get", "name:en"], ["get", "name_en"], ["get", "name"]]
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#444",
|
||||||
|
"text-halo-color": "#ffffff",
|
||||||
|
"text-halo-width": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,846 @@
|
|||||||
|
{
|
||||||
|
"version": 8,
|
||||||
|
"name": "Whiteout",
|
||||||
|
"id": "whiteout",
|
||||||
|
"glyphs": "/fonts/{fontstack}/{range}.pbf",
|
||||||
|
"sources": {
|
||||||
|
"osm": {
|
||||||
|
"type": "vector",
|
||||||
|
"url": "mbtiles://osm"
|
||||||
|
},
|
||||||
|
"contours": {
|
||||||
|
"type": "vector",
|
||||||
|
"url": "mbtiles://contours"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"layers": [
|
||||||
|
{
|
||||||
|
"id": "background",
|
||||||
|
"type": "background",
|
||||||
|
"paint": {
|
||||||
|
"background-color": "#ffffff"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "landcover",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "landcover",
|
||||||
|
"paint": {
|
||||||
|
"fill-color": [
|
||||||
|
"match",
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"class"
|
||||||
|
],
|
||||||
|
"wood",
|
||||||
|
"#e6ecdd",
|
||||||
|
"forest",
|
||||||
|
"#e2e9d9",
|
||||||
|
"grass",
|
||||||
|
"#eef3e8",
|
||||||
|
"grassland",
|
||||||
|
"#eef3e8",
|
||||||
|
"scrub",
|
||||||
|
"#eaefe0",
|
||||||
|
"heath",
|
||||||
|
"#ecefe2",
|
||||||
|
"wetland",
|
||||||
|
"#e8eee6",
|
||||||
|
"farmland",
|
||||||
|
"#f4f2ea",
|
||||||
|
"ice",
|
||||||
|
"#ffffff",
|
||||||
|
"#f3f2ee"
|
||||||
|
],
|
||||||
|
"fill-opacity": 0.8
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "landuse",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "landuse",
|
||||||
|
"paint": {
|
||||||
|
"fill-color": [
|
||||||
|
"match",
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"class"
|
||||||
|
],
|
||||||
|
"residential",
|
||||||
|
"#fbfaf8",
|
||||||
|
"commercial",
|
||||||
|
"#f6f1ed",
|
||||||
|
"industrial",
|
||||||
|
"#f1efec",
|
||||||
|
"retail",
|
||||||
|
"#f7f1ec",
|
||||||
|
"military",
|
||||||
|
"#f2ece7",
|
||||||
|
"cemetery",
|
||||||
|
"#e6ebe2",
|
||||||
|
"allotments",
|
||||||
|
"#e8eee0",
|
||||||
|
"farmland",
|
||||||
|
"#f4f2ea",
|
||||||
|
"farmyard",
|
||||||
|
"#f4f2ea",
|
||||||
|
"#fbfaf8"
|
||||||
|
],
|
||||||
|
"fill-opacity": 0.65
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "parks",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "park",
|
||||||
|
"paint": {
|
||||||
|
"fill-color": "#e3ecd9",
|
||||||
|
"fill-opacity": 0.85
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "water",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "water",
|
||||||
|
"paint": {
|
||||||
|
"fill-color": "#c8d7d5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "waterways",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "waterway",
|
||||||
|
"minzoom": 5,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#b4c8c6",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
5,
|
||||||
|
0.3,
|
||||||
|
9,
|
||||||
|
0.7,
|
||||||
|
13,
|
||||||
|
1.5,
|
||||||
|
17,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"line-opacity": 0.9
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "contours-line",
|
||||||
|
"type": "line",
|
||||||
|
"source": "contours",
|
||||||
|
"source-layer": "contour",
|
||||||
|
"minzoom": 10,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#cfc6b8",
|
||||||
|
"line-opacity": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
10,
|
||||||
|
0.2,
|
||||||
|
14,
|
||||||
|
0.55,
|
||||||
|
18,
|
||||||
|
0.7
|
||||||
|
],
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
10,
|
||||||
|
0.35,
|
||||||
|
14,
|
||||||
|
0.8,
|
||||||
|
18,
|
||||||
|
1.1
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "boundary-admin-minor",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "boundary",
|
||||||
|
"filter": [
|
||||||
|
"all",
|
||||||
|
[
|
||||||
|
"has",
|
||||||
|
"admin_level"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"!=",
|
||||||
|
"admin_level",
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"!=",
|
||||||
|
"admin_level",
|
||||||
|
4
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"!=",
|
||||||
|
"maritime",
|
||||||
|
1
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"minzoom": 5,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#dcd6d0",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
5,
|
||||||
|
0.35,
|
||||||
|
9,
|
||||||
|
0.7,
|
||||||
|
13,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"line-opacity": 0.75,
|
||||||
|
"line-dasharray": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "boundary-state",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "boundary",
|
||||||
|
"filter": [
|
||||||
|
"all",
|
||||||
|
[
|
||||||
|
"==",
|
||||||
|
"admin_level",
|
||||||
|
4
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"!=",
|
||||||
|
"maritime",
|
||||||
|
1
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"minzoom": 2,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#d0c8bc",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
2,
|
||||||
|
0.4,
|
||||||
|
5,
|
||||||
|
0.8,
|
||||||
|
9,
|
||||||
|
1.4,
|
||||||
|
13,
|
||||||
|
1.8
|
||||||
|
],
|
||||||
|
"line-opacity": 0.85,
|
||||||
|
"line-dasharray": [
|
||||||
|
3,
|
||||||
|
2
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "boundary-country",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "boundary",
|
||||||
|
"filter": [
|
||||||
|
"all",
|
||||||
|
[
|
||||||
|
"==",
|
||||||
|
"admin_level",
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"!=",
|
||||||
|
"maritime",
|
||||||
|
1
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#c4b8aa",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
0,
|
||||||
|
0.6,
|
||||||
|
4,
|
||||||
|
1.2,
|
||||||
|
7,
|
||||||
|
2,
|
||||||
|
12,
|
||||||
|
2.5
|
||||||
|
],
|
||||||
|
"line-opacity": 0.9
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "aeroway",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "aeroway",
|
||||||
|
"minzoom": 10,
|
||||||
|
"filter": [
|
||||||
|
"in",
|
||||||
|
"class",
|
||||||
|
"runway",
|
||||||
|
"taxiway"
|
||||||
|
],
|
||||||
|
"paint": {
|
||||||
|
"fill-color": "#e8e4e0",
|
||||||
|
"fill-outline-color": "#d0ccc4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-casing",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in",
|
||||||
|
"class",
|
||||||
|
"motorway",
|
||||||
|
"trunk",
|
||||||
|
"primary",
|
||||||
|
"secondary",
|
||||||
|
"tertiary",
|
||||||
|
"minor",
|
||||||
|
"service",
|
||||||
|
"residential"
|
||||||
|
],
|
||||||
|
"minzoom": 5,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#e6e0d6",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
5,
|
||||||
|
0.5,
|
||||||
|
8,
|
||||||
|
1.2,
|
||||||
|
12,
|
||||||
|
2.2,
|
||||||
|
16,
|
||||||
|
6
|
||||||
|
],
|
||||||
|
"line-opacity": 0.9
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-motorway",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in",
|
||||||
|
"class",
|
||||||
|
"motorway",
|
||||||
|
"trunk"
|
||||||
|
],
|
||||||
|
"minzoom": 5,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#e0d0b8",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
5,
|
||||||
|
0.7,
|
||||||
|
8,
|
||||||
|
1.5,
|
||||||
|
12,
|
||||||
|
3,
|
||||||
|
16,
|
||||||
|
6
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-primary",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in",
|
||||||
|
"class",
|
||||||
|
"primary",
|
||||||
|
"secondary"
|
||||||
|
],
|
||||||
|
"minzoom": 5,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#e8dfd4",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
5,
|
||||||
|
0.5,
|
||||||
|
8,
|
||||||
|
1.1,
|
||||||
|
12,
|
||||||
|
2.4,
|
||||||
|
16,
|
||||||
|
4.5
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-tertiary",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in",
|
||||||
|
"class",
|
||||||
|
"tertiary",
|
||||||
|
"minor"
|
||||||
|
],
|
||||||
|
"minzoom": 7,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#f0ebe4",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
7,
|
||||||
|
0.35,
|
||||||
|
10,
|
||||||
|
0.8,
|
||||||
|
14,
|
||||||
|
1.8,
|
||||||
|
18,
|
||||||
|
3
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "roads-local",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in",
|
||||||
|
"class",
|
||||||
|
"residential",
|
||||||
|
"service",
|
||||||
|
"living_street",
|
||||||
|
"track",
|
||||||
|
"path",
|
||||||
|
"pedestrian",
|
||||||
|
"footway",
|
||||||
|
"cycleway",
|
||||||
|
"bridleway",
|
||||||
|
"steps"
|
||||||
|
],
|
||||||
|
"minzoom": 8,
|
||||||
|
"layout": {
|
||||||
|
"line-cap": "round",
|
||||||
|
"line-join": "round"
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#ebe5dc",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
8,
|
||||||
|
0.3,
|
||||||
|
11,
|
||||||
|
0.6,
|
||||||
|
14,
|
||||||
|
1.2,
|
||||||
|
18,
|
||||||
|
2.5
|
||||||
|
],
|
||||||
|
"line-opacity": 0.95
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "railways",
|
||||||
|
"type": "line",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation",
|
||||||
|
"filter": [
|
||||||
|
"in",
|
||||||
|
"class",
|
||||||
|
"rail",
|
||||||
|
"light_rail",
|
||||||
|
"subway",
|
||||||
|
"tram"
|
||||||
|
],
|
||||||
|
"minzoom": 8,
|
||||||
|
"paint": {
|
||||||
|
"line-color": "#d0ccc4",
|
||||||
|
"line-width": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
8,
|
||||||
|
0.4,
|
||||||
|
12,
|
||||||
|
1,
|
||||||
|
16,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"line-dasharray": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "buildings",
|
||||||
|
"type": "fill",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "building",
|
||||||
|
"minzoom": 13,
|
||||||
|
"paint": {
|
||||||
|
"fill-color": "#dfdbd7",
|
||||||
|
"fill-outline-color": "#cfc9c2",
|
||||||
|
"fill-opacity": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
13,
|
||||||
|
0.3,
|
||||||
|
15,
|
||||||
|
0.9
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "road-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation_name",
|
||||||
|
"minzoom": 12,
|
||||||
|
"layout": {
|
||||||
|
"symbol-placement": "line",
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name:en"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"text-font": [
|
||||||
|
"Noto Sans Regular"
|
||||||
|
],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
12,
|
||||||
|
9,
|
||||||
|
16,
|
||||||
|
12,
|
||||||
|
20,
|
||||||
|
14
|
||||||
|
],
|
||||||
|
"text-max-angle": 30,
|
||||||
|
"symbol-spacing": 250
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#6b6156",
|
||||||
|
"text-halo-color": "#ffffff",
|
||||||
|
"text-halo-width": 1.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "rail-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "transportation_name",
|
||||||
|
"filter": [
|
||||||
|
"in",
|
||||||
|
"class",
|
||||||
|
"rail",
|
||||||
|
"transit"
|
||||||
|
],
|
||||||
|
"minzoom": 13,
|
||||||
|
"layout": {
|
||||||
|
"symbol-placement": "line",
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name:en"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"text-font": [
|
||||||
|
"Noto Sans Regular"
|
||||||
|
],
|
||||||
|
"text-size": 10
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#8a8078",
|
||||||
|
"text-halo-color": "#ffffff",
|
||||||
|
"text-halo-width": 1.2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "place-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "place",
|
||||||
|
"minzoom": 2,
|
||||||
|
"filter": [
|
||||||
|
"!=",
|
||||||
|
"class",
|
||||||
|
"continent"
|
||||||
|
],
|
||||||
|
"layout": {
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name:en"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name_en"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"text-font": [
|
||||||
|
"Noto Sans Regular"
|
||||||
|
],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
2,
|
||||||
|
10,
|
||||||
|
6,
|
||||||
|
12,
|
||||||
|
10,
|
||||||
|
14,
|
||||||
|
14,
|
||||||
|
16
|
||||||
|
],
|
||||||
|
"text-max-width": 10
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#6b6156",
|
||||||
|
"text-halo-color": "#ffffff",
|
||||||
|
"text-halo-width": 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "poi-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "poi",
|
||||||
|
"minzoom": 14,
|
||||||
|
"layout": {
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name:en"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name_en"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"text-font": [
|
||||||
|
"Noto Sans Regular"
|
||||||
|
],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
14,
|
||||||
|
9,
|
||||||
|
18,
|
||||||
|
12
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#7a7068",
|
||||||
|
"text-halo-color": "#ffffff",
|
||||||
|
"text-halo-width": 1.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "airport-labels",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "aerodrome_label",
|
||||||
|
"minzoom": 9,
|
||||||
|
"layout": {
|
||||||
|
"text-field": [
|
||||||
|
"coalesce",
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name:en"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"name"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"text-font": [
|
||||||
|
"Noto Sans Regular"
|
||||||
|
],
|
||||||
|
"text-size": [
|
||||||
|
"interpolate",
|
||||||
|
[
|
||||||
|
"linear"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"zoom"
|
||||||
|
],
|
||||||
|
9,
|
||||||
|
10,
|
||||||
|
14,
|
||||||
|
13
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#7a7068",
|
||||||
|
"text-halo-color": "#ffffff",
|
||||||
|
"text-halo-width": 1.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "house-numbers",
|
||||||
|
"type": "symbol",
|
||||||
|
"source": "osm",
|
||||||
|
"source-layer": "housenumber",
|
||||||
|
"minzoom": 17,
|
||||||
|
"layout": {
|
||||||
|
"text-field": [
|
||||||
|
"to-string",
|
||||||
|
[
|
||||||
|
"get",
|
||||||
|
"housenumber"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"text-font": [
|
||||||
|
"Noto Sans Regular"
|
||||||
|
],
|
||||||
|
"text-size": 10
|
||||||
|
},
|
||||||
|
"paint": {
|
||||||
|
"text-color": "#8a8078",
|
||||||
|
"text-halo-color": "#ffffff",
|
||||||
|
"text-halo-width": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
services:
|
||||||
|
gotak:
|
||||||
|
image: kdudkov/goatak_server:latest
|
||||||
|
platform: linux/amd64
|
||||||
|
container_name: viator-gotak
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- ${VIATOR_DATA_ROOT:?Set VIATOR_DATA_ROOT}/atak:/app
|
||||||
|
ports:
|
||||||
|
- "${ATAK_WEB_BIND:-127.0.0.1}:${ATAK_WEB_PORT:-8089}:8080"
|
||||||
|
- "${ATAK_DATA_BIND:-0.0.0.0}:5222:8999"
|
||||||
|
- "${ATAK_DATA_BIND:-0.0.0.0}:1100:8088"
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
labels:
|
||||||
|
caddy: atak.${VIATOR_DOMAIN:-viator.internal}
|
||||||
|
caddy.reverse_proxy: "{{upstreams 8080}}"
|
||||||
|
caddy.tls: internal
|
||||||
|
|
||||||
|
networks:
|
||||||
|
proxy:
|
||||||
|
external: true
|
||||||
|
name: viator_proxy
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
services:
|
||||||
|
bettercap:
|
||||||
|
image: bettercap/bettercap:latest
|
||||||
|
container_name: viator-bettercap
|
||||||
|
restart: unless-stopped
|
||||||
|
privileged: true
|
||||||
|
network_mode: host
|
||||||
|
command:
|
||||||
|
- -eval
|
||||||
|
- >-
|
||||||
|
set api.rest.username '${BETTERCAP_USER:-viator}';
|
||||||
|
set api.rest.password '${BETTERCAP_PASSWORD:?Set BETTERCAP_PASSWORD in viator.env}';
|
||||||
|
set api.rest.address '${VIATOR_DOCKER_GATEWAY:-172.17.0.1}';
|
||||||
|
set api.rest.port 8081;
|
||||||
|
set api.rest.alloworigin 'https://bettercap.${VIATOR_DOMAIN:-viator.internal}';
|
||||||
|
api.rest on;
|
||||||
|
set ui.address '${VIATOR_DOCKER_GATEWAY:-172.17.0.1}';
|
||||||
|
set ui.port 1600;
|
||||||
|
ui on;
|
||||||
|
set gps.device localhost:2947;
|
||||||
|
labels:
|
||||||
|
caddy: bettercap.${VIATOR_DOMAIN:-viator.internal}
|
||||||
|
caddy.reverse_proxy: host.docker.internal:1600
|
||||||
|
|
||||||
|
caddy_1: api.bettercap.${VIATOR_DOMAIN:-viator.internal}
|
||||||
|
caddy_1.reverse_proxy: host.docker.internal:8081
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
services:
|
||||||
|
caddy:
|
||||||
|
image: lucaslorentz/caddy-docker-proxy:2.9-alpine
|
||||||
|
container_name: viator-caddy
|
||||||
|
restart: unless-stopped
|
||||||
|
extra_hosts:
|
||||||
|
- "host.docker.internal:host-gateway"
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
- "443:443"
|
||||||
|
environment:
|
||||||
|
CADDY_INGRESS_NETWORKS: viator_proxy
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
|
- ${VIATOR_DATA_ROOT:?Set VIATOR_DATA_ROOT}/caddy/data:/data
|
||||||
|
- ${VIATOR_DATA_ROOT:?Set VIATOR_DATA_ROOT}/caddy/config:/config
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
labels:
|
||||||
|
caddy: bettercap.${VIATOR_DOMAIN:-viator.internal}
|
||||||
|
caddy.reverse_proxy: host.docker.internal:1600
|
||||||
|
|
||||||
|
caddy_1: api.bettercap.${VIATOR_DOMAIN:-viator.internal}
|
||||||
|
caddy_1.reverse_proxy: host.docker.internal:8081
|
||||||
|
|
||||||
|
networks:
|
||||||
|
proxy:
|
||||||
|
external: true
|
||||||
|
name: viator_proxy
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
services:
|
||||||
|
harness:
|
||||||
|
image: git.zakscode.com/ztimson/ai-harness:latest
|
||||||
|
container_name: viator-ai-harness
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
PUID: ${PUID:-1000}
|
||||||
|
PGID: ${PGID:-1000}
|
||||||
|
PUBLIC_URL: home.${VIATOR_DOMAIN:-viator.internal}
|
||||||
|
OFFICE_URL: office.${VIATOR_DOMAIN:-viator.internal}
|
||||||
|
OFFICE_SECRET: ${OFFICE_JWT_SECRET:?Office secret is required}
|
||||||
|
volumes:
|
||||||
|
- ${VIATOR_FILES_ROOT:-/mnt}:/mnt
|
||||||
|
- ${VIATOR_DATA_ROOT:?Set VIATOR_DATA_ROOT}/personal-cloud/models:/models
|
||||||
|
- ${VIATOR_DATA_ROOT:?Set VIATOR_DATA_ROOT}/personal-cloud/AI:/AI
|
||||||
|
ports:
|
||||||
|
- "${WEB_BIND:-127.0.0.1}:${HARNESS_PORT:-8082}:80"
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
labels:
|
||||||
|
caddy: home.${VIATOR_DOMAIN:-viator.internal}
|
||||||
|
caddy.reverse_proxy: "{{upstreams 80}}"
|
||||||
|
caddy.tls: internal
|
||||||
|
caddy.reverse_proxy.lb_policy: client_ip_hash
|
||||||
|
caddy.reverse_proxy.stream_close_delay: 24h
|
||||||
|
|
||||||
|
onlyoffice:
|
||||||
|
image: onlyoffice/documentserver:latest
|
||||||
|
container_name: viator-onlyoffice
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
JWT_ENABLED: "true"
|
||||||
|
JWT_SECRET: ${OFFICE_JWT_SECRET:?Office secret is required}
|
||||||
|
volumes:
|
||||||
|
- ${VIATOR_DATA_ROOT:?Set VIATOR_DATA_ROOT}/personal-cloud/office/data:/var/www/onlyoffice/Data
|
||||||
|
- ${VIATOR_DATA_ROOT:?Set VIATOR_DATA_ROOT}/personal-cloud/office/logs:/var/log/onlyoffice
|
||||||
|
- ${VIATOR_DATA_ROOT:?Set VIATOR_DATA_ROOT}/personal-cloud/office/lib:/var/lib/onlyoffice
|
||||||
|
- ${VIATOR_DATA_ROOT:?Set VIATOR_DATA_ROOT}/personal-cloud/office/db:/var/lib/postgresql
|
||||||
|
- ${VIATOR_DATA_ROOT:?Set VIATOR_DATA_ROOT}/personal-cloud/office/rabbitmq:/var/lib/rabbitmq
|
||||||
|
- ${VIATOR_DATA_ROOT:?Set VIATOR_DATA_ROOT}/personal-cloud/office/redis:/var/lib/redis
|
||||||
|
ports:
|
||||||
|
- "${WEB_BIND:-127.0.0.1}:${OFFICE_PORT:-8083}:80"
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
labels:
|
||||||
|
caddy: office.${VIATOR_DOMAIN:-viator.internal}
|
||||||
|
caddy.reverse_proxy: "{{upstreams 80}}"
|
||||||
|
caddy.tls: internal
|
||||||
|
|
||||||
|
networks:
|
||||||
|
proxy:
|
||||||
|
external: true
|
||||||
|
name: viator_proxy
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
services:
|
||||||
|
librespeed:
|
||||||
|
image: lscr.io/linuxserver/librespeed:latest
|
||||||
|
container_name: viator-librespeed
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
PUID: ${PUID:-1000}
|
||||||
|
PGID: ${PGID:-1000}
|
||||||
|
TZ: ${TZ:-Etc/UTC}
|
||||||
|
volumes:
|
||||||
|
- ${VIATOR_DATA_ROOT:?Set VIATOR_DATA_ROOT}/librespeed:/config
|
||||||
|
ports:
|
||||||
|
- "${LIBRESPEED_BIND:-127.0.0.1}:${LIBRESPEED_PORT:-1900}:80"
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
labels:
|
||||||
|
caddy: speedtest.${VIATOR_DOMAIN:-viator.internal}
|
||||||
|
caddy.reverse_proxy: "{{upstreams 80}}"
|
||||||
|
caddy.tls: internal
|
||||||
|
|
||||||
|
networks:
|
||||||
|
proxy:
|
||||||
|
external: true
|
||||||
|
name: viator_proxy
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
services:
|
||||||
|
cartomake:
|
||||||
|
image: git.zakscode.com/ztimson/cartomake:latest
|
||||||
|
container_name: viator-cartomake
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
TILESERVER_URL: tiles.${VIATOR_DOMAIN:-viator.internal}
|
||||||
|
GEOCODE_URL: geocode.${VIATOR_DOMAIN:-viator.internal}
|
||||||
|
ports:
|
||||||
|
- "${CARTOMAKE_BIND:-127.0.0.1}:${CARTOMAKE_PORT:-8080}:80"
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
labels:
|
||||||
|
caddy: maps.${VIATOR_DOMAIN:-viator.internal}
|
||||||
|
caddy.reverse_proxy: "{{upstreams 80}}"
|
||||||
|
caddy.tls: internal
|
||||||
|
|
||||||
|
photon:
|
||||||
|
image: rtuszik/photon-docker:latest
|
||||||
|
container_name: viator-photon
|
||||||
|
restart: unless-stopped
|
||||||
|
profiles: [photon]
|
||||||
|
environment:
|
||||||
|
UPDATE_STRATEGY: PARALLEL
|
||||||
|
UPDATE_INTERVAL: 720h
|
||||||
|
volumes:
|
||||||
|
- ${VIATOR_DATA_ROOT:?Set VIATOR_DATA_ROOT}/maps/geocoder:/photon/data
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
labels:
|
||||||
|
caddy: geocode.${VIATOR_DOMAIN:-viator.internal}
|
||||||
|
caddy.reverse_proxy: "{{upstreams 2322}}"
|
||||||
|
caddy.tls: internal
|
||||||
|
|
||||||
|
tileserver:
|
||||||
|
image: maptiler/tileserver-gl:v4.11.0
|
||||||
|
container_name: viator-tileserver
|
||||||
|
restart: unless-stopped
|
||||||
|
profiles: [tiles]
|
||||||
|
command: ["--config", "/config/config.json"]
|
||||||
|
volumes:
|
||||||
|
- ${VIATOR_DATA_ROOT:?Set VIATOR_DATA_ROOT}/maps/tiles:/data
|
||||||
|
- ${VIATOR_DATA_ROOT:?Set VIATOR_DATA_ROOT}/maps/tileserver:/config:ro
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
labels:
|
||||||
|
caddy: tiles.${VIATOR_DOMAIN:-viator.internal}
|
||||||
|
caddy.reverse_proxy: "{{upstreams 8080}}"
|
||||||
|
caddy.tls: internal
|
||||||
|
|
||||||
|
networks:
|
||||||
|
proxy:
|
||||||
|
external: true
|
||||||
|
name: viator_proxy
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
services:
|
||||||
|
openwebrx:
|
||||||
|
image: jketterl/openwebrx:stable
|
||||||
|
container_name: viator-openwebrx
|
||||||
|
restart: unless-stopped
|
||||||
|
profiles: [openwebrx]
|
||||||
|
devices:
|
||||||
|
- /dev/bus/usb:/dev/bus/usb
|
||||||
|
volumes:
|
||||||
|
- ${VIATOR_DATA_ROOT:?Set VIATOR_DATA_ROOT}/sdr/openwebrx:/var/lib/openwebrx
|
||||||
|
tmpfs:
|
||||||
|
- /tmp/openwebrx
|
||||||
|
ports:
|
||||||
|
- "${SDR_BIND:-127.0.0.1}:${OPENWEBRX_PORT:-8073}:8073"
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
labels:
|
||||||
|
caddy: sdr.${VIATOR_DOMAIN:-viator.internal}
|
||||||
|
caddy.reverse_proxy: "{{upstreams 8073}}"
|
||||||
|
caddy.tls: internal
|
||||||
|
|
||||||
|
ultrafeeder:
|
||||||
|
image: ghcr.io/sdr-enthusiasts/docker-adsb-ultrafeeder:latest
|
||||||
|
container_name: viator-ultrafeeder
|
||||||
|
hostname: ultrafeeder
|
||||||
|
restart: unless-stopped
|
||||||
|
profiles: [adsb]
|
||||||
|
device_cgroup_rules:
|
||||||
|
- "c 189:* rwm"
|
||||||
|
devices:
|
||||||
|
- /dev/bus/usb:/dev/bus/usb
|
||||||
|
environment:
|
||||||
|
TZ: ${TZ:-Etc/UTC}
|
||||||
|
LOGLEVEL: error
|
||||||
|
READSB_DEVICE_TYPE: rtlsdr
|
||||||
|
READSB_GAIN: autogain
|
||||||
|
READSB_LAT: ${FEEDER_LAT:-}
|
||||||
|
READSB_LON: ${FEEDER_LONG:-}
|
||||||
|
READSB_RX_LOCATION_ACCURACY: "2"
|
||||||
|
READSB_STATS_RANGE: "true"
|
||||||
|
TAR1090_DEFAULTCENTERLAT: ${FEEDER_LAT:-0}
|
||||||
|
TAR1090_DEFAULTCENTERLON: ${FEEDER_LONG:-0}
|
||||||
|
TAR1090_PAGETITLE: ${FEEDER_NAME:-Viator ADS-B}
|
||||||
|
TAR1090_MESSAGERATEINTITLE: "true"
|
||||||
|
TAR1090_PLANECOUNTINTITLE: "true"
|
||||||
|
TAR1090_ENABLE_AC_DB: "true"
|
||||||
|
TAR1090_FLIGHTAWARELINKS: "true"
|
||||||
|
TAR1090_SITESHOW: "true"
|
||||||
|
GRAPHS1090_DARKMODE: "true"
|
||||||
|
volumes:
|
||||||
|
- ${VIATOR_DATA_ROOT:?Set VIATOR_DATA_ROOT}/sdr/adsb/globe_history:/var/globe_history
|
||||||
|
- ${VIATOR_DATA_ROOT:?Set VIATOR_DATA_ROOT}/sdr/adsb/graphs1090:/var/lib/collectd
|
||||||
|
- ${VIATOR_DATA_ROOT:?Set VIATOR_DATA_ROOT}/sdr/adsb/autogain:/run/autogain
|
||||||
|
- /proc/diskstats:/proc/diskstats:ro
|
||||||
|
tmpfs:
|
||||||
|
- /run:exec,size=256M
|
||||||
|
- /tmp:size=128M
|
||||||
|
- /var/log:size=32M
|
||||||
|
ports:
|
||||||
|
- "${SDR_BIND:-127.0.0.1}:${TAR1090_PORT:-8078}:80"
|
||||||
|
- "${ADSB_BEAST_BIND:-127.0.0.1}:30005:30005"
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
labels:
|
||||||
|
caddy: adsb.${VIATOR_DOMAIN:-viator.internal}
|
||||||
|
caddy.reverse_proxy: "{{upstreams 80}}"
|
||||||
|
caddy.tls: internal
|
||||||
|
|
||||||
|
rtl433:
|
||||||
|
image: hertzg/rtl_433:latest
|
||||||
|
container_name: viator-rtl433
|
||||||
|
restart: unless-stopped
|
||||||
|
profiles: [rtl433]
|
||||||
|
devices:
|
||||||
|
- /dev/bus/usb:/dev/bus/usb
|
||||||
|
environment:
|
||||||
|
TZ: ${TZ:-Etc/UTC}
|
||||||
|
command: ["-M", "time:unix:usec:utc", "-M", "protocol", "-F", "json"]
|
||||||
|
|
||||||
|
networks:
|
||||||
|
proxy:
|
||||||
|
external: true
|
||||||
|
name: viator_proxy
|
||||||
+810
@@ -0,0 +1,810 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -Eeuo pipefail
|
||||||
|
|
||||||
|
# Viator bootstrap + installer. Keep the Git URL in one place.
|
||||||
|
VIATOR_GIT_REPO="${VIATOR_GIT_REPO:-https://git.zakscode.com/ztimson/viator.git}"
|
||||||
|
VIATOR_VERSION="1.0.0"
|
||||||
|
VIATOR_DIR="${VIATOR_DIR:-}"
|
||||||
|
CONFIG_DIR="/etc/viator"
|
||||||
|
STATE_FILE="$CONFIG_DIR/selections"
|
||||||
|
ENV_FILE="$CONFIG_DIR/viator.env"
|
||||||
|
DATA_ROOT=""
|
||||||
|
INSTALL_ROOT=""
|
||||||
|
TMP_DIR=""
|
||||||
|
LOCK_FILE="/run/lock/viator-install.lock"
|
||||||
|
APT_UPGRADE="no"
|
||||||
|
USE_CADDY="no"
|
||||||
|
ADMIN_USER="${SUDO_USER:-${USER:-root}}"
|
||||||
|
FAILED=()
|
||||||
|
SUCCEEDED=()
|
||||||
|
SELECTED=()
|
||||||
|
|
||||||
|
RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[0;33m'; RESET='\033[0m'
|
||||||
|
|
||||||
|
log() { printf '%b[viator]%b %s\n' "$GREEN" "$RESET" "$*"; }
|
||||||
|
warn() { printf '%b[warning]%b %s\n' "$YELLOW" "$RESET" "$*" >&2; }
|
||||||
|
err() { printf '%b[error]%b %s\n' "$RED" "$RESET" "$*" >&2; }
|
||||||
|
die() { err "$*"; exit 1; }
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
[[ -n "$TMP_DIR" && -d "$TMP_DIR" ]] && rm -rf -- "$TMP_DIR"
|
||||||
|
}
|
||||||
|
trap cleanup EXIT
|
||||||
|
trap 'rc=$?; err "Unexpected failure on line $LINENO (exit $rc)"; exit "$rc"' ERR
|
||||||
|
|
||||||
|
require_root() { [[ $EUID -eq 0 ]] || die "Run as root: curl ... | sudo bash"; }
|
||||||
|
|
||||||
|
init() {
|
||||||
|
require_root
|
||||||
|
VIATOR_DIR="$(realpath -e -- "$VIATOR_DIR")"
|
||||||
|
[[ -f "$VIATOR_DIR/install.sh" && -d "$VIATOR_DIR/docker" ]] || die "Invalid Viator repository directory: $VIATOR_DIR"
|
||||||
|
INSTALL_ROOT="$VIATOR_DIR"
|
||||||
|
DATA_ROOT="$VIATOR_DIR/data"
|
||||||
|
mkdir -p "$CONFIG_DIR" "$DATA_ROOT" /var/log/viator
|
||||||
|
chmod 0750 "$CONFIG_DIR"
|
||||||
|
TMP_DIR="$(mktemp -d /tmp/viator.XXXXXX)"
|
||||||
|
exec 9>"$LOCK_FILE"
|
||||||
|
flock -n 9 || die "Another Viator installer is already running."
|
||||||
|
touch "$STATE_FILE" "$ENV_FILE"
|
||||||
|
chmod 0600 "$ENV_FILE"
|
||||||
|
if [[ -f "$ENV_FILE" ]]; then
|
||||||
|
# This file is root-owned and generated by this installer.
|
||||||
|
set -a
|
||||||
|
# shellcheck disable=SC1090
|
||||||
|
source "$ENV_FILE"
|
||||||
|
set +a
|
||||||
|
fi
|
||||||
|
DATA_ROOT="${VIATOR_DATA_ROOT:-$DATA_ROOT}"
|
||||||
|
VIATOR_DATA_ROOT="$DATA_ROOT"
|
||||||
|
ADMIN_USER="${VIATOR_ADMIN_USER:-$ADMIN_USER}"
|
||||||
|
}
|
||||||
|
|
||||||
|
has_cmd() { command -v "$1" >/dev/null 2>&1; }
|
||||||
|
|
||||||
|
ui() {
|
||||||
|
if has_cmd whiptail; then return 0; fi
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -y whiptail >/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
msg() { whiptail --title "Viator" --msgbox "$1" 12 76; }
|
||||||
|
ask_yes() {
|
||||||
|
whiptail --title "Viator" --yesno "$1" 12 76
|
||||||
|
}
|
||||||
|
ask_input() {
|
||||||
|
local title="$1" prompt="$2" default="${3:-}" result
|
||||||
|
result="$(whiptail --title "$title" --inputbox "$prompt" 10 76 "$default" 3>&1 1>&2 2>&3)" || return 1
|
||||||
|
printf '%s' "$result"
|
||||||
|
}
|
||||||
|
ask_password() {
|
||||||
|
local title="$1" prompt="$2" default="${3:-}" result
|
||||||
|
result="$(whiptail --title "$title" --passwordbox "$prompt" 10 76 "$default" 3>&1 1>&2 2>&3)" || return 1
|
||||||
|
printf '%s' "$result"
|
||||||
|
}
|
||||||
|
|
||||||
|
save_env() {
|
||||||
|
local key value
|
||||||
|
for key in "$@"; do
|
||||||
|
value="${!key-}"
|
||||||
|
value="${value//\\/\\\\}"
|
||||||
|
value="${value//\"/\\\"}"
|
||||||
|
if grep -q "^${key}=" "$ENV_FILE"; then
|
||||||
|
sed -i "s|^${key}=.*|${key}=\"${value}\"|" "$ENV_FILE"
|
||||||
|
else
|
||||||
|
printf '%s="%s"\n' "$key" "$value" >> "$ENV_FILE"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
chmod 0600 "$ENV_FILE"
|
||||||
|
}
|
||||||
|
|
||||||
|
apt_install() {
|
||||||
|
local packages=("$@")
|
||||||
|
((${#packages[@]})) || return 0
|
||||||
|
apt-get install -y --no-install-recommends "${packages[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
apt_setup() {
|
||||||
|
log "Updating APT package indexes..."
|
||||||
|
apt-get update
|
||||||
|
if [[ "$APT_UPGRADE" == yes ]]; then
|
||||||
|
log "Applying system upgrades..."
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch() {
|
||||||
|
local url="$1" output="$2"
|
||||||
|
curl --fail --location --retry 3 --retry-delay 2 --connect-timeout 20 "$url" -o "$output"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bootstrap() {
|
||||||
|
[[ "${1:-}" == --installed ]] && { VIATOR_DIR="${2:?Missing install directory}"; return 0; }
|
||||||
|
[[ $EUID -eq 0 ]] || die "Run as root: curl ... | sudo bash"
|
||||||
|
local default_dir answer target parent
|
||||||
|
default_dir="$(pwd -P)"
|
||||||
|
[[ -r /dev/tty ]] || die "An interactive terminal is required to choose the install directory."
|
||||||
|
printf '\nViator installation directory [%s]: ' "$default_dir" > /dev/tty
|
||||||
|
IFS= read -r answer < /dev/tty || die "Could not read install directory."
|
||||||
|
target="${answer:-$default_dir}"
|
||||||
|
target="${target/#\~/$HOME}"
|
||||||
|
[[ "$target" == /* ]] || target="$(pwd -P)/$target"
|
||||||
|
target="$(realpath -m -- "$target")"
|
||||||
|
parent="$(dirname "$target")"
|
||||||
|
mkdir -p "$parent"
|
||||||
|
|
||||||
|
log "Updating package indexes..."
|
||||||
|
apt-get update
|
||||||
|
log "Installing Git..."
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -y git ca-certificates
|
||||||
|
|
||||||
|
if [[ -d "$target/.git" ]]; then
|
||||||
|
local origin
|
||||||
|
origin="$(git -C "$target" remote get-url origin 2>/dev/null || true)"
|
||||||
|
[[ "$origin" == "$VIATOR_GIT_REPO" ]] || die "The directory is a Git repository with a different origin: $origin"
|
||||||
|
log "Updating existing Viator checkout..."
|
||||||
|
git -C "$target" pull --ff-only
|
||||||
|
elif [[ -d "$target" ]] && [[ -n "$(find "$target" -mindepth 1 -maxdepth 1 -print -quit)" ]]; then
|
||||||
|
die "Install directory is not empty and is not a Viator checkout: $target\nChoose an empty directory or an existing Viator checkout."
|
||||||
|
else
|
||||||
|
log "Cloning Viator into $target..."
|
||||||
|
git clone --depth 1 "$VIATOR_GIT_REPO" "$target"
|
||||||
|
fi
|
||||||
|
|
||||||
|
[[ -f "$target/install.sh" ]] || die "The repository checkout does not contain install.sh."
|
||||||
|
exec bash "$target/install.sh" --installed "$target"
|
||||||
|
}
|
||||||
|
|
||||||
|
run_component() {
|
||||||
|
local name="$1" fn="$2"
|
||||||
|
log "Installing $name..."
|
||||||
|
if "$fn"; then
|
||||||
|
SUCCEEDED+=("$name")
|
||||||
|
log "$name completed."
|
||||||
|
else
|
||||||
|
FAILED+=("$name")
|
||||||
|
err "$name failed; continuing with other selections."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
choose_components() {
|
||||||
|
local choices=() item
|
||||||
|
local labels=(
|
||||||
|
"tools" "Tools (btop, jq, tmux)"
|
||||||
|
"theme" "Viator terminal theme and MOTD"
|
||||||
|
"wireguard" "WireGuard VPN"
|
||||||
|
"fallback-ap" "Fallback wireless access point"
|
||||||
|
"vnc" "VNC remote desktop"
|
||||||
|
"ai" "Local AI (LiteRT + Gemma)"
|
||||||
|
"hat" "Wireless HAT (GPS, LoRa, RTC, SDR)"
|
||||||
|
"docker" "Docker Engine and Caddy options"
|
||||||
|
"pentest" "Pen Test Suite (host tools + Bettercap)"
|
||||||
|
"speedtest" "LibreSpeed"
|
||||||
|
"atak" "GoATAK Server"
|
||||||
|
"maps" "Maps (Cartomake, Photon, TileServer GL)"
|
||||||
|
"personal-cloud" "Personal Cloud (AI Harness + OnlyOffice)"
|
||||||
|
"sdr" "SDR services (OpenWebRX+, ADS-B, RTL_433)"
|
||||||
|
"zims" "ZIM Archives"
|
||||||
|
)
|
||||||
|
for ((i=0; i<${#labels[@]}; i+=2)); do
|
||||||
|
item="${labels[i]}"
|
||||||
|
if grep -qx "$item" "$STATE_FILE"; then choices+=("$item" "${labels[i+1]}" ON)
|
||||||
|
else choices+=("$item" "${labels[i+1]}" OFF); fi
|
||||||
|
done
|
||||||
|
local selected
|
||||||
|
selected="$(whiptail --title "Viator — Components" --checklist \
|
||||||
|
"Select the components to install. Existing data and configuration are preserved." \
|
||||||
|
22 82 15 "${choices[@]}" 3>&1 1>&2 2>&3)" || exit 0
|
||||||
|
SELECTED=()
|
||||||
|
read -r -a SELECTED <<< "${selected//\"/}"
|
||||||
|
printf '%s\n' "${SELECTED[@]}" > "$STATE_FILE"
|
||||||
|
}
|
||||||
|
|
||||||
|
contains() { local needle="$1" x; for x in "${SELECTED[@]}"; do [[ "$x" == "$needle" ]] && return 0; done; return 1; }
|
||||||
|
|
||||||
|
configure_global() {
|
||||||
|
local root user upgrade
|
||||||
|
root="$(ask_input "Storage" "Docker/application data root:" "$DATA_ROOT")" || exit 0
|
||||||
|
[[ "$root" == /* ]] || { msg "Storage path must be absolute."; exit 1; }
|
||||||
|
DATA_ROOT="${root%/}"
|
||||||
|
mkdir -p "$DATA_ROOT"
|
||||||
|
user="$(ask_input "Administrator" "Linux user to add to the docker group:" "$ADMIN_USER")" || exit 0
|
||||||
|
id "$user" >/dev/null 2>&1 || { msg "User '$user' does not exist."; exit 1; }
|
||||||
|
ADMIN_USER="$user"
|
||||||
|
if ask_yes "Run apt upgrade -y after apt update? This can take time and may update the whole OS."; then
|
||||||
|
APT_UPGRADE=yes
|
||||||
|
else APT_UPGRADE=no; fi
|
||||||
|
VIATOR_DATA_ROOT="$DATA_ROOT"
|
||||||
|
VIATOR_ADMIN_USER="$ADMIN_USER"
|
||||||
|
save_env VIATOR_DATA_ROOT VIATOR_ADMIN_USER
|
||||||
|
}
|
||||||
|
|
||||||
|
install_tools() { apt_install btop jq tmux; }
|
||||||
|
|
||||||
|
install_theme() {
|
||||||
|
local motd="/etc/motd" marker_start="# >>> VIATOR BANNER >>>" marker_end="# <<< VIATOR BANNER <<<"
|
||||||
|
local tmp="$TMP_DIR/motd"
|
||||||
|
touch "$motd"
|
||||||
|
awk -v s="$marker_start" -v e="$marker_end" 'BEGIN{skip=0} $0==s{skip=1;next} $0==e{skip=0;next} !skip{print}' "$motd" > "$tmp"
|
||||||
|
cat >> "$tmp" <<'BANNER'
|
||||||
|
# >>> VIATOR BANNER >>>
|
||||||
|
__ ___ _ _____ ___ ____
|
||||||
|
\ \ / / | | ||_ _/ _ \| _ \
|
||||||
|
\ \ / /| | | | | || | | | |_) |
|
||||||
|
\ V / | |__| | | || |_| | _ <
|
||||||
|
\_/ \____/ |_| \___/|_| \_\
|
||||||
|
|
||||||
|
OFF-GRID SYSTEMS
|
||||||
|
# <<< VIATOR BANNER <<<
|
||||||
|
BANNER
|
||||||
|
cp -a "$motd" "$motd.viator-backup.$(date +%s)"
|
||||||
|
install -m 0644 "$tmp" "$motd"
|
||||||
|
cat > /etc/profile.d/viator.sh <<'PROMPT'
|
||||||
|
# Viator system-wide interactive Bash prompt.
|
||||||
|
case $- in *i*) ;; *) return ;; esac
|
||||||
|
LINES="\[\e[36m\]"
|
||||||
|
[ "$EUID" -eq 0 ] && LINES="\[\e[91m\]"
|
||||||
|
USERHOST="\[\e[33m\]"
|
||||||
|
DIRECTORY="\[\e[97m\]"
|
||||||
|
ENDCOLOR="\[\e[m\]"
|
||||||
|
PS1="${LINES}╭──(${USERHOST}\u${LINES}@${USERHOST}\h${LINES})-[${DIRECTORY}\w${LINES}]${ENDCOLOR}\n${LINES}╰─${ENDCOLOR}\$ "
|
||||||
|
PROMPT
|
||||||
|
}
|
||||||
|
|
||||||
|
install_wireguard() {
|
||||||
|
apt_install wireguard
|
||||||
|
mkdir -p /etc/wireguard
|
||||||
|
chmod 0700 /etc/wireguard
|
||||||
|
if [[ ! -s /etc/wireguard/wg0.conf ]]; then
|
||||||
|
if ask_yes "No /etc/wireguard/wg0.conf exists. Open an editor to create it now?"; then
|
||||||
|
local editor="${EDITOR:-nano}"
|
||||||
|
has_cmd "$editor" || apt_install nano
|
||||||
|
"$editor" /etc/wireguard/wg0.conf
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [[ -s /etc/wireguard/wg0.conf ]]; then
|
||||||
|
chmod 0600 /etc/wireguard/wg0.conf
|
||||||
|
systemctl enable wg-quick@wg0
|
||||||
|
systemctl restart wg-quick@wg0 || return 1
|
||||||
|
else warn "WireGuard installed; wg0.conf not created, so the tunnel was not started."; fi
|
||||||
|
}
|
||||||
|
|
||||||
|
install_fallback_ap() {
|
||||||
|
apt_install curl
|
||||||
|
local conf=/etc/fallback-ap.conf ssid password iface cidr start end monitor ignore mode targets
|
||||||
|
[[ -f "$conf" ]] && source "$conf"
|
||||||
|
ssid="$(ask_input "Fallback AP" "Wi-Fi SSID:" "${FALLBACK_AP_SSID:-$(hostname)}")" || return 1
|
||||||
|
password="$(ask_password "Fallback AP" "Wi-Fi password (8+ characters):" "${FALLBACK_AP_PASSWORD:-}")" || return 1
|
||||||
|
((${#password} >= 8)) || { msg "Wi-Fi password must be at least 8 characters."; return 1; }
|
||||||
|
iface="$(iw dev 2>/dev/null | awk '$1=="Interface"{print $2;exit}')"
|
||||||
|
iface="$(ask_input "Fallback AP" "Wireless interface:" "${FALLBACK_AP_IFACE:-${iface:-wlan0}}")" || return 1
|
||||||
|
cidr="$(ask_input "Fallback AP" "AP address/CIDR:" "${FALLBACK_AP_CIDR:-10.10.10.1/24}")" || return 1
|
||||||
|
start="$(ask_input "Fallback AP" "DHCP start octet:" "${FALLBACK_AP_DHCP_START_OCTET:-100}")" || return 1
|
||||||
|
end="$(ask_input "Fallback AP" "DHCP end octet:" "${FALLBACK_AP_DHCP_END_OCTET:-250}")" || return 1
|
||||||
|
monitor="$(ask_input "Fallback AP" "Monitor interface (blank = all):" "${FALLBACK_AP_MONITOR_IFACE:-}")" || return 1
|
||||||
|
ignore="$(ask_input "Fallback AP" "Ignore interface (blank = none):" "${FALLBACK_AP_IGNORE_IFACE:-}")" || return 1
|
||||||
|
mode="$(whiptail --title "Fallback AP" --radiolist "Connectivity check mode:" 12 70 2 link "Check link state" ON internet "Check internet access" OFF 3>&1 1>&2 2>&3)" || return 1
|
||||||
|
targets="${FALLBACK_AP_CHECK_TARGETS:-1.1.1.1 8.8.8.8}"
|
||||||
|
[[ "$mode" == internet ]] && targets="$(ask_input "Fallback AP" "Internet check targets:" "$targets")" || true
|
||||||
|
cat > "$conf" <<CONF
|
||||||
|
FALLBACK_AP_SSID=$(printf '%q' "$ssid")
|
||||||
|
FALLBACK_AP_PASSWORD=$(printf '%q' "$password")
|
||||||
|
FALLBACK_AP_IFACE=$(printf '%q' "$iface")
|
||||||
|
FALLBACK_AP_CIDR=$(printf '%q' "$cidr")
|
||||||
|
FALLBACK_AP_DHCP_START_OCTET=$(printf '%q' "$start")
|
||||||
|
FALLBACK_AP_DHCP_END_OCTET=$(printf '%q' "$end")
|
||||||
|
FALLBACK_AP_MONITOR_IFACE=$(printf '%q' "$monitor")
|
||||||
|
FALLBACK_AP_IGNORE_IFACE=$(printf '%q' "$ignore")
|
||||||
|
FALLBACK_AP_CHECK_MODE=$(printf '%q' "$mode")
|
||||||
|
FALLBACK_AP_CHECK_TARGETS=$(printf '%q' "$targets")
|
||||||
|
CONF
|
||||||
|
chmod 0600 "$conf"
|
||||||
|
export FALLBACK_AP_SSID="$ssid" FALLBACK_AP_PASSWORD="$password" FALLBACK_AP_IFACE="$iface"
|
||||||
|
export FALLBACK_AP_CIDR="$cidr" FALLBACK_AP_DHCP_START_OCTET="$start" FALLBACK_AP_DHCP_END_OCTET="$end"
|
||||||
|
export FALLBACK_AP_MONITOR_IFACE="$monitor" FALLBACK_AP_IGNORE_IFACE="$ignore"
|
||||||
|
export FALLBACK_AP_CHECK_MODE="$mode" FALLBACK_AP_CHECK_TARGETS="$targets"
|
||||||
|
curl -fsSL https://git.zakscode.com/ztimson/fallback-ap/raw/branch/master/install.sh -o "$TMP_DIR/fallback-ap.sh"
|
||||||
|
bash "$TMP_DIR/fallback-ap.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
install_vnc() {
|
||||||
|
local session="${XDG_SESSION_TYPE:-}" desktop="${XDG_CURRENT_DESKTOP:-}"
|
||||||
|
if [[ -z "$session" ]]; then
|
||||||
|
if [[ -n "${WAYLAND_DISPLAY:-}" ]]; then session=wayland
|
||||||
|
elif [[ -n "${DISPLAY:-}" ]]; then session=x11
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [[ "$session" == wayland ]] || grep -qi 'wayland\|labwc' /etc/os-release 2>/dev/null; then
|
||||||
|
apt_install wayvnc
|
||||||
|
mkdir -p /etc/wayvnc
|
||||||
|
if [[ ! -f /etc/wayvnc/config ]]; then
|
||||||
|
cat > /etc/wayvnc/config <<'VNC'
|
||||||
|
use_relative_paths=true
|
||||||
|
address=127.0.0.1
|
||||||
|
enable_auth=false
|
||||||
|
enable_pam=false
|
||||||
|
relax_encryption=true
|
||||||
|
VNC
|
||||||
|
chmod 0600 /etc/wayvnc/config
|
||||||
|
fi
|
||||||
|
if has_cmd raspi-config; then raspi-config nonint do_vnc 0 || true; fi
|
||||||
|
systemctl enable wayvnc 2>/dev/null || true
|
||||||
|
systemctl restart wayvnc 2>/dev/null || warn "WayVNC package installed, but no system service was found. Configure it for the active desktop session."
|
||||||
|
elif [[ "$session" == x11 ]]; then
|
||||||
|
apt_install tigervnc-standalone-server
|
||||||
|
warn "TigerVNC installed. Configure a per-user VNC session; no desktop login password was changed."
|
||||||
|
else
|
||||||
|
warn "No active graphical session detected. VNC requires a desktop (Wayland/labwc or X11); nothing was exposed."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
install_docker_engine() {
|
||||||
|
apt_install ca-certificates curl gnupg qemu-user-static rsync
|
||||||
|
local existing_root=""
|
||||||
|
if has_cmd docker; then existing_root="$(docker info --format '{{.DockerRootDir}}' 2>/dev/null || true)"; fi
|
||||||
|
if ! has_cmd docker; then
|
||||||
|
curl -fsSL https://get.docker.com -o "$TMP_DIR/get-docker.sh"
|
||||||
|
sh "$TMP_DIR/get-docker.sh"
|
||||||
|
fi
|
||||||
|
mkdir -p /etc/docker "$DATA_ROOT/engine"
|
||||||
|
if [[ -n "$existing_root" && "$existing_root" != "$DATA_ROOT/engine" && -d "$existing_root" ]]; then
|
||||||
|
if [[ -z "$(find "$DATA_ROOT/engine" -mindepth 1 -maxdepth 1 -print -quit)" ]]; then
|
||||||
|
systemctl stop docker || true
|
||||||
|
rsync -aHAX --numeric-ids "$existing_root/" "$DATA_ROOT/engine/"
|
||||||
|
else
|
||||||
|
err "Docker already has data at $existing_root and the selected destination is non-empty."
|
||||||
|
err "Refusing to switch roots automatically; migrate Docker data manually first."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
local daemon=/etc/docker/daemon.json
|
||||||
|
python3 - "$daemon" "$DATA_ROOT/engine" <<'PY'
|
||||||
|
import json, os, sys, tempfile
|
||||||
|
path, root = sys.argv[1:]
|
||||||
|
data = {}
|
||||||
|
if os.path.exists(path):
|
||||||
|
with open(path) as f: data = json.load(f)
|
||||||
|
data['data-root'] = root
|
||||||
|
fd, tmp = tempfile.mkstemp(dir=os.path.dirname(path), prefix='.daemon.')
|
||||||
|
with os.fdopen(fd, 'w') as f: json.dump(data, f, indent=2); f.write('\n')
|
||||||
|
os.chmod(tmp, 0o644); os.replace(tmp, path)
|
||||||
|
PY
|
||||||
|
systemctl enable --now docker
|
||||||
|
docker network inspect viator_proxy >/dev/null 2>&1 || docker network create viator_proxy >/dev/null
|
||||||
|
usermod -aG docker "$ADMIN_USER"
|
||||||
|
}
|
||||||
|
|
||||||
|
install_caddy() {
|
||||||
|
mkdir -p "$DATA_ROOT/caddy/data" "$DATA_ROOT/caddy/config"
|
||||||
|
docker network inspect viator_proxy >/dev/null 2>&1 || docker network create viator_proxy >/dev/null
|
||||||
|
local compose="$VIATOR_DIR/docker/caddy.yml"
|
||||||
|
VIATOR_DATA_ROOT="$DATA_ROOT" docker compose -f "$compose" up -d
|
||||||
|
}
|
||||||
|
|
||||||
|
export_caddy_ca() {
|
||||||
|
[[ "$USE_CADDY" == yes ]] || return 0
|
||||||
|
for _ in {1..20}; do
|
||||||
|
docker cp viator-caddy:/data/caddy/pki/authorities/local/root.crt "$CONFIG_DIR/caddy-root.crt" 2>/dev/null && break
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
if [[ -f "$CONFIG_DIR/caddy-root.crt" ]]; then
|
||||||
|
chmod 0644 "$CONFIG_DIR/caddy-root.crt"
|
||||||
|
log "Caddy root certificate exported to $CONFIG_DIR/caddy-root.crt. Import it on client devices."
|
||||||
|
else warn "Caddy's local root CA is not available yet; export it after the first HTTPS route is active."; fi
|
||||||
|
}
|
||||||
|
|
||||||
|
configure_docker() {
|
||||||
|
local engine caddy
|
||||||
|
engine="$(whiptail --title "Docker" --yesno "Install or configure Docker Engine? (Required for container packages)" 10 76 3>&1 1>&2 2>&3 && echo yes || echo no)"
|
||||||
|
caddy="$(whiptail --title "Docker" --yesno "Install Caddy Docker Proxy for local HTTPS hostnames (.home.arpa)?" 10 76 3>&1 1>&2 2>&3 && echo yes || echo no)"
|
||||||
|
if [[ "$engine" == yes || "$caddy" == yes ]] || contains speedtest || contains atak || contains maps || contains personal-cloud || contains sdr || contains pentest; then
|
||||||
|
install_docker_engine || return 1
|
||||||
|
fi
|
||||||
|
USE_CADDY="$caddy"
|
||||||
|
if [[ "$USE_CADDY" == yes ]]; then install_caddy || return 1; fi
|
||||||
|
save_env USE_CADDY
|
||||||
|
}
|
||||||
|
|
||||||
|
compose_stack() {
|
||||||
|
local name="$1" file="$2" envfile=""
|
||||||
|
shift 2
|
||||||
|
if (($#)) && [[ "$1" != --profile* ]]; then envfile="$1"; shift; fi
|
||||||
|
local target="$VIATOR_DIR/$file"
|
||||||
|
local -a args=(docker compose -f "$target")
|
||||||
|
mkdir -p "$DATA_ROOT/$name"
|
||||||
|
[[ -n "$envfile" ]] && args+=(--env-file "$envfile")
|
||||||
|
VIATOR_DATA_ROOT="$DATA_ROOT" "${args[@]}" "$@" up -d
|
||||||
|
}
|
||||||
|
|
||||||
|
install_speedtest() {
|
||||||
|
local bind=127.0.0.1 port="${LIBRESPEED_PORT:-1900}"
|
||||||
|
if [[ "$USE_CADDY" != yes ]]; then
|
||||||
|
bind=0.0.0.0
|
||||||
|
port="$(ask_input "LibreSpeed" "Host port for the speed test UI:" "$port")" || return 1
|
||||||
|
fi
|
||||||
|
LIBRESPEED_BIND="$bind" LIBRESPEED_PORT="$port"
|
||||||
|
save_env LIBRESPEED_BIND LIBRESPEED_PORT
|
||||||
|
compose_stack librespeed docker/librespeed.yml "$ENV_FILE"
|
||||||
|
}
|
||||||
|
install_atak() {
|
||||||
|
local bind=127.0.0.1 port="${ATAK_WEB_PORT:-8089}"
|
||||||
|
if [[ "$USE_CADDY" != yes ]]; then
|
||||||
|
bind=0.0.0.0
|
||||||
|
port="$(ask_input "GoATAK" "Host port for the web UI:" "$port")" || return 1
|
||||||
|
fi
|
||||||
|
ATAK_WEB_BIND="$bind" ATAK_WEB_PORT="$port"
|
||||||
|
save_env ATAK_WEB_BIND ATAK_WEB_PORT
|
||||||
|
compose_stack atak docker/atak.yml "$ENV_FILE"
|
||||||
|
}
|
||||||
|
install_maps() {
|
||||||
|
local photon tiles satellite vector contours url
|
||||||
|
apt_install unzip
|
||||||
|
photon=no; tiles=no; satellite=no; vector=no; contours=no
|
||||||
|
ask_yes "Install Photon geocoder? (~69 GB)" && photon=yes || true
|
||||||
|
ask_yes "Install TileServer GL?" && tiles=yes || true
|
||||||
|
if [[ "$tiles" == yes ]]; then
|
||||||
|
ask_yes "Download MapTiler Satellite dataset? (~186 GB; paste the download URL when prompted)" && satellite=yes || true
|
||||||
|
ask_yes "Download MapTiler Vector dataset? (~70 GB; paste the download URL when prompted)" && vector=yes || true
|
||||||
|
ask_yes "Download Contours dataset? (~18 GB; requires your hosted URL)" && contours=yes || true
|
||||||
|
fi
|
||||||
|
MAP_PHOTON="$photon"; MAP_TILESERVER="$tiles"; MAP_SATELLITE="$satellite"; MAP_VECTOR="$vector"; MAP_CONTOURS="$contours"
|
||||||
|
TILESERVER_URL=""; GEOCODE_URL=""
|
||||||
|
[[ "$tiles" == yes ]] && TILESERVER_URL="http://tileserver:8080"
|
||||||
|
[[ "$photon" == yes ]] && GEOCODE_URL="http://photon:2322"
|
||||||
|
save_env MAP_PHOTON MAP_TILESERVER MAP_SATELLITE MAP_VECTOR MAP_CONTOURS TILESERVER_URL GEOCODE_URL
|
||||||
|
local map_required=0 map_available
|
||||||
|
[[ "$photon" == yes ]] && map_required=$((map_required + 69*1024*1024*1024))
|
||||||
|
[[ "$satellite" == yes ]] && map_required=$((map_required + 186*1024*1024*1024))
|
||||||
|
[[ "$vector" == yes ]] && map_required=$((map_required + 70*1024*1024*1024))
|
||||||
|
[[ "$contours" == yes ]] && map_required=$((map_required + 18*1024*1024*1024))
|
||||||
|
map_available="$(df -PB1 "$DATA_ROOT" | awk 'NR==2{print $4}')"
|
||||||
|
if ((map_required > 0)); then
|
||||||
|
msg "Selected map components need approximately $(zim_size_gb "$map_required") of storage, plus temporary download space. Available: $(zim_size_gb "$map_available")."
|
||||||
|
((map_available >= map_required)) || return 1
|
||||||
|
ask_yes "Continue with the selected map storage requirements?" || return 0
|
||||||
|
fi
|
||||||
|
for dataset in satellite vector contours; do
|
||||||
|
case "$dataset" in satellite) [[ "$satellite" == yes ]] || continue;; vector) [[ "$vector" == yes ]] || continue;; contours) [[ "$contours" == yes ]] || continue;; esac
|
||||||
|
case "$dataset" in
|
||||||
|
satellite) url="$(ask_input "MapTiler Satellite" "Paste the actual MapTiler download URL:" "")" || return 1;;
|
||||||
|
vector) url="$(ask_input "MapTiler Vector" "Paste the actual MapTiler download URL:" "")" || return 1;;
|
||||||
|
contours) url="$(ask_input "Contours" "Paste your hosted dataset URL:" "")" || return 1;;
|
||||||
|
esac
|
||||||
|
[[ "$url" =~ ^https?:// ]] || { warn "Skipped $dataset: a valid HTTP(S) URL is required."; continue; }
|
||||||
|
local expected=0 available archive target
|
||||||
|
case "$dataset" in satellite) expected=$((186*1024*1024*1024));; vector) expected=$((70*1024*1024*1024));; contours) expected=$((18*1024*1024*1024));; esac
|
||||||
|
available="$(df -PB1 "$DATA_ROOT" | awk 'NR==2{print $4}')"
|
||||||
|
if ((available < expected)); then
|
||||||
|
warn "Not enough free space for $dataset; need approximately $(zim_size_gb "$expected")."
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
mkdir -p "$DATA_ROOT/maps/tiles/$dataset" "$DATA_ROOT/maps/.downloads"
|
||||||
|
archive="$DATA_ROOT/maps/.downloads/$dataset.download"
|
||||||
|
if ! curl -fL --retry 3 -C - "$url" -o "$archive"; then rm -f "$archive"; return 1; fi
|
||||||
|
target="$DATA_ROOT/maps/tiles/$dataset"
|
||||||
|
if unzip -tq "$archive" >/dev/null 2>&1; then
|
||||||
|
if ! unzip -oq "$archive" -d "$target"; then rm -f "$archive"; return 1; fi
|
||||||
|
rm -f "$archive"
|
||||||
|
else
|
||||||
|
local ext="${url%%\?*}"; ext="${ext##*.}"
|
||||||
|
if [[ "$ext" == mbtiles ]]; then mv "$archive" "$target/$dataset.mbtiles"
|
||||||
|
else mv "$archive" "$target/$(basename "$url")"; fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
mkdir -p "$DATA_ROOT/maps/tileserver"
|
||||||
|
if [[ ! -f "$DATA_ROOT/maps/tileserver/config.json" ]]; then
|
||||||
|
install -m 0644 "$VIATOR_DIR/data/maps/tileserver/config.json" \
|
||||||
|
"$DATA_ROOT/maps/tileserver/config.json"
|
||||||
|
fi
|
||||||
|
if [[ "$DATA_ROOT" != "$VIATOR_DIR/data" ]]; then
|
||||||
|
mkdir -p "$DATA_ROOT/maps/tileserver/styles"
|
||||||
|
cp -an "$VIATOR_DIR/data/maps/tileserver/styles/." \
|
||||||
|
"$DATA_ROOT/maps/tileserver/styles/"
|
||||||
|
fi
|
||||||
|
local bind=127.0.0.1 port="${CARTOMAKE_PORT:-8080}"
|
||||||
|
if [[ "$USE_CADDY" != yes ]]; then
|
||||||
|
bind=0.0.0.0
|
||||||
|
port="$(ask_input "Cartomake" "Host port for the map UI:" "$port")" || return 1
|
||||||
|
fi
|
||||||
|
CARTOMAKE_BIND="$bind" CARTOMAKE_PORT="$port"
|
||||||
|
save_env CARTOMAKE_BIND CARTOMAKE_PORT
|
||||||
|
local -a profiles=()
|
||||||
|
[[ "$photon" == yes ]] && profiles+=(--profile photon)
|
||||||
|
[[ "$tiles" == yes ]] && profiles+=(--profile tiles)
|
||||||
|
compose_stack maps docker/maps.yml "$ENV_FILE" "${profiles[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
install_personal_cloud() {
|
||||||
|
local hostname="$(ask_input "Personal Cloud" "AI Harness hostname (example: ai.home.arpa):" "ai.home.arpa")" || return 1
|
||||||
|
local office="$(ask_input "Personal Cloud" "OnlyOffice hostname:" "office.home.arpa")" || return 1
|
||||||
|
local bind=127.0.0.1 harness_port="${HARNESS_PORT:-8082}" office_port="${OFFICE_PORT:-8083}"
|
||||||
|
if [[ "$USE_CADDY" != yes ]]; then
|
||||||
|
bind=0.0.0.0
|
||||||
|
harness_port="$(ask_input "Personal Cloud" "AI Harness host port:" "$harness_port")" || return 1
|
||||||
|
office_port="$(ask_input "Personal Cloud" "OnlyOffice host port:" "$office_port")" || return 1
|
||||||
|
fi
|
||||||
|
local secret="${OFFICE_JWT_SECRET:-}"
|
||||||
|
[[ -n "$secret" ]] || secret="$(openssl rand -hex 32)"
|
||||||
|
OFFICE_JWT_SECRET="$secret" HARNESS_HOSTNAME="$hostname" OFFICE_HOSTNAME="$office"
|
||||||
|
WEB_BIND="$bind" HARNESS_PORT="$harness_port" OFFICE_PORT="$office_port"
|
||||||
|
save_env OFFICE_JWT_SECRET HARNESS_HOSTNAME OFFICE_HOSTNAME WEB_BIND HARNESS_PORT OFFICE_PORT
|
||||||
|
compose_stack personal-cloud docker/cloud.yml "$ENV_FILE"
|
||||||
|
}
|
||||||
|
|
||||||
|
install_pentest() {
|
||||||
|
apt_install arp-scan aircrack-ng gobuster hashcat hcxtools hydra john netcat-openbsd nikto \
|
||||||
|
nmap masscan reaver sqlmap tcpdump wireshark
|
||||||
|
BETTERCAP_USER="$(ask_input "Bettercap" "Web UI username (separate from Linux login):" "viator")" || return 1
|
||||||
|
BETTERCAP_PASSWORD="$(ask_password "Bettercap" "Set a strong Bettercap UI password (letters/numbers/dot/dash/underscore):" "")" || return 1
|
||||||
|
[[ "$BETTERCAP_PASSWORD" =~ ^[A-Za-z0-9._-]{12,}$ ]] || { msg "Use 12+ characters: letters, numbers, dot, dash or underscore."; return 1; }
|
||||||
|
save_env BETTERCAP_USER BETTERCAP_PASSWORD
|
||||||
|
curl -fsSL https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfinstall.erb -o "$TMP_DIR/msfinstall"
|
||||||
|
chmod 0700 "$TMP_DIR/msfinstall"
|
||||||
|
"$TMP_DIR/msfinstall"
|
||||||
|
compose_stack bettercap docker/bettercap.yml "$ENV_FILE"
|
||||||
|
}
|
||||||
|
|
||||||
|
install_sdr() {
|
||||||
|
local owx= noads=no rtl=no
|
||||||
|
ask_yes "Install OpenWebRX+ (general SDR receiver)?" && owx=yes || true
|
||||||
|
ask_yes "Install ADS-B receiver and tar1090?" && noads=yes || true
|
||||||
|
ask_yes "Install RTL_433 sensor decoder?" && rtl=yes || true
|
||||||
|
if [[ "$owx" == yes && "$noads" == yes ]] || [[ "$owx" == yes && "$rtl" == yes ]] || [[ "$noads" == yes && "$rtl" == yes ]]; then
|
||||||
|
if ! ask_yes "One RTL-SDR cannot be used by multiple services simultaneously. Continue anyway? You will need separate receivers or configure only one service to use the HAT tuner."; then return 1; fi
|
||||||
|
fi
|
||||||
|
SDR_OPENWEBRX="$owx" SDR_ADSB="$noads" SDR_RTL433="$rtl"
|
||||||
|
save_env SDR_OPENWEBRX SDR_ADSB SDR_RTL433
|
||||||
|
local -a profiles=()
|
||||||
|
[[ "$owx" == yes ]] && profiles+=(--profile openwebrx)
|
||||||
|
[[ "$noads" == yes ]] && profiles+=(--profile adsb)
|
||||||
|
[[ "$rtl" == yes ]] && profiles+=(--profile rtl433)
|
||||||
|
compose_stack sdr docker/sdr.yml "$ENV_FILE" "${profiles[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
install_ai() {
|
||||||
|
apt_install curl ca-certificates
|
||||||
|
local dir="$DATA_ROOT/ai" repo user
|
||||||
|
dir="$(ask_input "Local AI" "Install directory:" "$dir")" || return 1
|
||||||
|
repo="$(ask_input "Local AI" "Hugging Face model repository:" "litert-community/gemma-4-E2B-it-litert-lm")" || return 1
|
||||||
|
user=viator-ai
|
||||||
|
id "$user" >/dev/null 2>&1 || useradd --system --home "$dir" --create-home --shell /usr/sbin/nologin "$user"
|
||||||
|
mkdir -p "$dir"
|
||||||
|
chown -R "$user:$user" "$dir"
|
||||||
|
if ! has_cmd uv; then
|
||||||
|
curl -LsSf https://astral.sh/uv/install.sh -o "$TMP_DIR/uv-install.sh"
|
||||||
|
env UV_INSTALL_DIR=/usr/local/bin sh "$TMP_DIR/uv-install.sh"
|
||||||
|
fi
|
||||||
|
runuser -u "$user" -- bash -lc "cd '$dir' && /usr/local/bin/uv venv --python=3.13 --seed && /usr/local/bin/uv pip install --python .venv/bin/python litert-cli-nightly litert-lm-nightly"
|
||||||
|
if ask_yes "Download/import $repo now? Model downloads can be several GB."; then
|
||||||
|
runuser -u "$user" -- bash -lc "cd '$dir' && .venv/bin/litert-lm import --from-huggingface-repo '$repo'"
|
||||||
|
fi
|
||||||
|
warn "LiteRT serving flags/API differ by release. The model runtime is installed, but no unverified systemd API command was generated."
|
||||||
|
}
|
||||||
|
|
||||||
|
install_hat() {
|
||||||
|
apt_install git i2c-tools minicom util-linux-extra gpsd gpsd-clients chrony pps-tools rtl-sdr
|
||||||
|
local model="$(tr -d '\0' </proc/device-tree/model 2>/dev/null || true)"
|
||||||
|
local pi5=no
|
||||||
|
[[ "$model" == *"Raspberry Pi 5"* ]] && pi5=yes
|
||||||
|
local boot=/boot/firmware/config.txt cmd=/boot/firmware/cmdline.txt
|
||||||
|
[[ -f "$boot" ]] || boot=/boot/config.txt
|
||||||
|
[[ -f "$cmd" ]] || cmd=/boot/cmdline.txt
|
||||||
|
if ask_yes "Enable GPS UART and remove the Linux serial console from the kernel command line?"; then
|
||||||
|
if [[ "$pi5" == yes ]]; then grep -q '^dtparam=uart0=on' "$boot" || echo 'dtparam=uart0=on' >> "$boot"
|
||||||
|
else grep -q '^enable_uart=1' "$boot" || echo 'enable_uart=1' >> "$boot"; fi
|
||||||
|
if [[ -f "$cmd" ]]; then sed -i 's/\(^\| \)console=serial0,[^ ]*//g; s/\(^\| \)console=ttyAMA0,[^ ]*//g' "$cmd"; fi
|
||||||
|
fi
|
||||||
|
if ask_yes "Enable LoRa SX1262 SPI1 overlay (SPI1-1CS)?"; then
|
||||||
|
grep -q '^dtoverlay=spi1-1cs' "$boot" || echo 'dtoverlay=spi1-1cs' >> "$boot"
|
||||||
|
grep -q '^dtparam=spi=on' "$boot" || echo 'dtparam=spi=on' >> "$boot"
|
||||||
|
fi
|
||||||
|
if ask_yes "Enable HAT PCF85063A RTC? Do not select if a Pi/PiSugar RTC is already in use."; then
|
||||||
|
grep -q '^dtparam=i2c_arm=on' "$boot" || echo 'dtparam=i2c_arm=on' >> "$boot"
|
||||||
|
grep -q '^dtoverlay=i2c-rtc,pcf85063a' "$boot" || echo 'dtoverlay=i2c-rtc,pcf85063a' >> "$boot"
|
||||||
|
fi
|
||||||
|
if ask_yes "Enable GPS PPS input on GPIO6? (Requires HAT switch SW1-2 ON.)"; then
|
||||||
|
grep -q '^dtoverlay=pps-gpio,gpiopin=6' "$boot" || echo 'dtoverlay=pps-gpio,gpiopin=6' >> "$boot"
|
||||||
|
fi
|
||||||
|
warn "Hardware overlays were written. Reboot is required. Meshtasticd radio-region and GPSD-to-Meshtastic PTY sharing are not configured automatically by this release."
|
||||||
|
}
|
||||||
|
|
||||||
|
# Kiwix OPDS catalogue -> TSV: title, approximate bytes, acquisition URL.
|
||||||
|
fetch_zim_catalogue() {
|
||||||
|
local xml="$TMP_DIR/kiwix-opds.xml" tsv="$TMP_DIR/zims.tsv"
|
||||||
|
log "Fetching the live Kiwix OPDS catalogue..." >&2
|
||||||
|
curl -fsSL --compressed --retry 3 'https://opds.library.kiwix.org/catalog/v2/entries?count=-1' -o "$xml" || return 1
|
||||||
|
python3 - "$xml" "$tsv" <<'PY'
|
||||||
|
import sys, xml.etree.ElementTree as ET, re
|
||||||
|
from urllib.parse import urljoin
|
||||||
|
src, dst = sys.argv[1:]
|
||||||
|
root = ET.parse(src).getroot()
|
||||||
|
ns = {'a':'http://www.w3.org/2005/Atom', 'd':'http://purl.org/dc/terms/'}
|
||||||
|
items=[]
|
||||||
|
for e in root.findall('.//a:entry', ns):
|
||||||
|
title=(e.findtext('a:title', default='', namespaces=ns) or '').strip()
|
||||||
|
if not title: continue
|
||||||
|
size=''
|
||||||
|
for node in e.iter():
|
||||||
|
tag=node.tag.rsplit('}',1)[-1].lower()
|
||||||
|
if tag in ('extent','size','filesize') and node.text:
|
||||||
|
m=re.search(r'([0-9]+(?:\.[0-9]+)?)\s*(gb|gib|mb|mib|bytes?)?', node.text, re.I)
|
||||||
|
if m:
|
||||||
|
n=float(m.group(1)); unit=(m.group(2) or 'bytes').lower()
|
||||||
|
size=int(n * (1024**3 if unit in ('gb','gib') else 1024**2 if unit in ('mb','mib') else 1))
|
||||||
|
break
|
||||||
|
language=''
|
||||||
|
for node in e.iter():
|
||||||
|
if node.tag.rsplit('}',1)[-1].lower() in ('language', 'lang') and node.text:
|
||||||
|
language=node.text.strip().lower(); break
|
||||||
|
if language and language not in ('en','eng','english'): continue
|
||||||
|
links=[]
|
||||||
|
for link in e.findall('a:link', ns):
|
||||||
|
rel=(link.get('rel') or '').lower(); typ=(link.get('type') or '').lower(); href=link.get('href') or ''
|
||||||
|
if href and ('acquisition' in rel or 'application/x-zim' in typ or href.lower().endswith('.zim')):
|
||||||
|
links.append(urljoin('https://opds.library.kiwix.org/', href))
|
||||||
|
if not links:
|
||||||
|
for link in e.findall('a:link', ns):
|
||||||
|
href=link.get('href') or ''
|
||||||
|
if href and '.zim' in href.lower(): links.append(urljoin('https://opds.library.kiwix.org/', href))
|
||||||
|
if links:
|
||||||
|
items.append((title, size or 0, links[0]))
|
||||||
|
with open(dst,'w',encoding='utf-8') as f:
|
||||||
|
for title,size,url in sorted(items,key=lambda x:x[0].casefold()):
|
||||||
|
clean=lambda s:str(s).replace('\t',' ').replace('\n',' ')
|
||||||
|
f.write(f'{clean(title)}\t{size}\t{clean(url)}\n')
|
||||||
|
PY
|
||||||
|
printf '%s' "$tsv"
|
||||||
|
}
|
||||||
|
|
||||||
|
zim_size_gb() {
|
||||||
|
awk -v b="$1" 'BEGIN { if (b<=0) printf "unknown GB"; else printf "%.2f GB", b/1073741824 }'
|
||||||
|
}
|
||||||
|
|
||||||
|
install_zims() {
|
||||||
|
local catalog
|
||||||
|
catalog="$(fetch_zim_catalogue)" || { warn "Kiwix catalogue could not be downloaded."; return 1; }
|
||||||
|
local -a wanted=(
|
||||||
|
"Amateur Radio Q&A|Radio operations, amateur radio reference and troubleshooting"
|
||||||
|
"based.cooking|Simple, practical cooking recipes and food preparation"
|
||||||
|
"CD3WD Project|Sustainable technologies, agriculture, water, energy and development"
|
||||||
|
"CrashCourse|Educational video-course reference across school subjects"
|
||||||
|
"Food for preppers|Food storage, preservation and practical emergency cooking"
|
||||||
|
"iFixit|Device repair guides, teardowns and troubleshooting"
|
||||||
|
"K-12 Education LibreTexts|Open K–12 textbooks and educational resources"
|
||||||
|
"Khan Academy|Lessons and practice for mathematics, science and other subjects"
|
||||||
|
"MedlinePlus|Consumer health information from the US National Library of Medicine"
|
||||||
|
"Medical Library|Medical reference and clinical learning resources"
|
||||||
|
"Military Manuals|Military field manuals, doctrine and training references"
|
||||||
|
"Pets Q&A|Veterinary and pet-care questions and answers"
|
||||||
|
"PhET|Interactive science and mathematics simulations"
|
||||||
|
"Project Gutenberg|Public-domain books and literature"
|
||||||
|
"Ready.gov|Disaster preparedness and emergency planning"
|
||||||
|
"S2 Underground|Open-source intelligence and signal-intelligence topics"
|
||||||
|
"WikiBooks|Community-authored books and manuals"
|
||||||
|
"Wikipedia|General-purpose encyclopedia and reference"
|
||||||
|
"Wikisource|Free source texts, historical documents and literature"
|
||||||
|
)
|
||||||
|
local -a options=() selected=()
|
||||||
|
local spec name reason match line title bytes url gb id
|
||||||
|
for spec in "${wanted[@]}"; do
|
||||||
|
name="${spec%%|*}"; reason="${spec#*|}"; match=""
|
||||||
|
# Match title with a tolerant, case-insensitive substring search.
|
||||||
|
while IFS=$'\t' read -r title bytes url; do
|
||||||
|
if [[ "${title,,}" == *"${name,,}"* ]]; then match="$title"$'\t'"$bytes"$'\t'"$url"; break; fi
|
||||||
|
done < "$catalog"
|
||||||
|
if [[ -n "$match" ]]; then
|
||||||
|
IFS=$'\t' read -r title bytes url <<< "$match"
|
||||||
|
gb="$(zim_size_gb "$bytes")"
|
||||||
|
id="$(printf '%s' "$title" | tr -cs '[:alnum:]_-' '_' | cut -c1-40)"
|
||||||
|
options+=("$id" "$title ($gb): $reason" OFF)
|
||||||
|
else
|
||||||
|
id="manual_$(printf '%s' "$name" | tr -cs '[:alnum:]' '_')"
|
||||||
|
options+=("$id" "$name (size unknown): $reason [manual URL]" OFF)
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
local chosen
|
||||||
|
chosen="$(whiptail --title "ZIM Archives" --checklist "Select archives to download. Entries are alphabetical. Existing files are skipped." 24 100 18 "${options[@]}" 3>&1 1>&2 2>&3)" || return 0
|
||||||
|
read -r -a selected <<< "${chosen//\"/}"
|
||||||
|
((${#selected[@]})) || return 0
|
||||||
|
mkdir -p "$DATA_ROOT"
|
||||||
|
local required=0
|
||||||
|
for id in "${selected[@]}"; do
|
||||||
|
while IFS=$'\t' read -r title bytes url; do
|
||||||
|
local safe="$(printf '%s' "$title" | tr -cs '[:alnum:]_-' '_')"
|
||||||
|
[[ "$safe" == "$id" ]] && required=$((required + bytes))
|
||||||
|
done < "$catalog"
|
||||||
|
done
|
||||||
|
local available
|
||||||
|
available="$(df -PB1 "$DATA_ROOT" | awk 'NR==2{print $4}')"
|
||||||
|
if ((required > available)); then
|
||||||
|
msg "Not enough free space for the selected ZIMs. Required: $(zim_size_gb "$required"); available: $(zim_size_gb "$available")."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
if ((required > 0)) && ! ask_yes "Selected ZIM downloads require about $(zim_size_gb "$required"). Continue?"; then return 0; fi
|
||||||
|
mkdir -p "$DATA_ROOT/zims"
|
||||||
|
local total=0 count=0
|
||||||
|
for id in "${selected[@]}"; do
|
||||||
|
local found=no
|
||||||
|
for spec in "${wanted[@]}"; do
|
||||||
|
name="${spec%%|*}"
|
||||||
|
local key="$(printf '%s' "$name" | tr -cs '[:alnum:]' '_')"
|
||||||
|
if [[ "$id" == "manual_$key" ]]; then
|
||||||
|
url="$(ask_input "Manual ZIM URL" "Paste the official .zim download URL for $name:" "")" || continue
|
||||||
|
[[ "$url" =~ ^https?:// ]] || { warn "Invalid URL; skipping $name."; continue; }
|
||||||
|
local filename="$(basename "${url%%\?*}")"
|
||||||
|
[[ "$filename" == *.zim ]] || filename="$key.zim"
|
||||||
|
[[ -e "$DATA_ROOT/zims/$filename" ]] && { warn "$filename already exists; skipped."; continue; }
|
||||||
|
local part="$DATA_ROOT/zims/$filename.part"
|
||||||
|
if curl -fL --retry 3 -C - "$url" -o "$part"; then mv "$part" "$DATA_ROOT/zims/$filename"; else rm -f "$part"; FAILED+=("ZIM: $name"); fi
|
||||||
|
found=yes; break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
[[ "$found" == yes ]] && continue
|
||||||
|
while IFS=$'\t' read -r title bytes url; do
|
||||||
|
local safe="$(printf '%s' "$title" | tr -cs '[:alnum:]_-' '_')"
|
||||||
|
if [[ "$safe" == "$id" ]]; then
|
||||||
|
local filename="$(basename "${url%%\?*}")"
|
||||||
|
[[ "$filename" == *.zim ]] || filename="$safe.zim"
|
||||||
|
if [[ -e "$DATA_ROOT/zims/$filename" ]]; then warn "$filename already exists; skipped."; else
|
||||||
|
log "Downloading $title ($(zim_size_gb "$bytes"))..."
|
||||||
|
local part="$DATA_ROOT/zims/$filename.part"
|
||||||
|
if curl -fL --retry 3 -C - "$url" -o "$part"; then mv "$part" "$DATA_ROOT/zims/$filename"; else rm -f "$part"; FAILED+=("ZIM: $title"); fi
|
||||||
|
fi
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done < "$catalog"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
summary() {
|
||||||
|
local text=$'Selected components:\n'
|
||||||
|
if ((${#SELECTED[@]})); then
|
||||||
|
for x in "${SELECTED[@]}"; do text+=" • $x"$'\n'; done
|
||||||
|
else text+=$' (none)\n'; fi
|
||||||
|
text+=$'\n'"Data root: $DATA_ROOT"$'\n'"APT upgrade: $APT_UPGRADE"$'\n\n'
|
||||||
|
text+=$'Shared prerequisites: APT indexes, curl, Python 3, and Docker Engine for container stacks.\n\n'
|
||||||
|
text+="Review storage requirements before starting large map/ZIM downloads."
|
||||||
|
msg "$text"
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
bootstrap "$@"
|
||||||
|
init
|
||||||
|
ui
|
||||||
|
choose_components
|
||||||
|
configure_global
|
||||||
|
if [[ "$APT_UPGRADE" == yes ]]; then DEBIAN_FRONTEND=noninteractive apt-get upgrade -y; fi
|
||||||
|
summary
|
||||||
|
ask_yes "Begin installation? Existing data will be preserved; individual failures won't stop other components." || exit 0
|
||||||
|
|
||||||
|
# Docker is a shared prerequisite; configure once for all selected container apps.
|
||||||
|
if contains docker || contains pentest || contains speedtest || contains atak || contains maps || contains personal-cloud || contains sdr; then
|
||||||
|
run_component "Docker" configure_docker
|
||||||
|
fi
|
||||||
|
|
||||||
|
contains tools && run_component "Tools" install_tools || true
|
||||||
|
contains theme && run_component "Theme" install_theme || true
|
||||||
|
contains wireguard && run_component "WireGuard" install_wireguard || true
|
||||||
|
contains fallback-ap && run_component "Fallback AP" install_fallback_ap || true
|
||||||
|
contains vnc && run_component "VNC" install_vnc || true
|
||||||
|
contains ai && run_component "Local AI" install_ai || true
|
||||||
|
contains hat && run_component "Wireless HAT" install_hat || true
|
||||||
|
contains pentest && run_component "Pen Test Suite" install_pentest || true
|
||||||
|
contains speedtest && run_component "LibreSpeed" install_speedtest || true
|
||||||
|
contains atak && run_component "GoATAK Server" install_atak || true
|
||||||
|
contains maps && run_component "Maps" install_maps || true
|
||||||
|
contains personal-cloud && run_component "Personal Cloud" install_personal_cloud || true
|
||||||
|
contains sdr && run_component "SDR" install_sdr || true
|
||||||
|
contains zims && run_component "ZIM Archives" install_zims || true
|
||||||
|
export_caddy_ca
|
||||||
|
|
||||||
|
local report=$'Installation finished.\n\nSucceeded:\n'
|
||||||
|
for x in "${SUCCEEDED[@]}"; do report+=" • $x"$'\n'; done
|
||||||
|
report+=$'\nFailed:\n'
|
||||||
|
for x in "${FAILED[@]}"; do report+=" • $x"$'\n'; done
|
||||||
|
report+=$'\nReboot is recommended if hardware overlays or kernel modules changed.'
|
||||||
|
msg "$report"
|
||||||
|
printf '%s\n' "Succeeded: ${SUCCEEDED[*]:-(none)}" "Failed: ${FAILED[*]:-(none)}" | tee "/var/log/viator/install-$(date +%F-%H%M%S).log"
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
||||||
Reference in New Issue
Block a user