diff options
Diffstat (limited to 'snippets')
-rw-r--r-- | snippets/json_maplibre_style | 26 | ||||
-rw-r--r-- | snippets/json_maplibre_style_circle | 19 |
2 files changed, 45 insertions, 0 deletions
diff --git a/snippets/json_maplibre_style b/snippets/json_maplibre_style new file mode 100644 index 0000000..bc88d10 --- /dev/null +++ b/snippets/json_maplibre_style | |||
@@ -0,0 +1,26 @@ | |||
1 | { | ||
2 | "version": 8, | ||
3 | "name": "simple", | ||
4 | "id": "simple", | ||
5 | "bearing": 0, | ||
6 | "pitch": 0, | ||
7 | "sources": { | ||
8 | "nlsc": { | ||
9 | "type": "raster", | ||
10 | "maxzoom": 15, | ||
11 | "tiles": [ | ||
12 | "https://wmts.nlsc.gov.tw/wmts/B5000/default/GoogleMapsCompatible/{z}/{y}/{x}" | ||
13 | ] | ||
14 | } | ||
15 | }, | ||
16 | "glyphs": "https://tile.openstreetmap.jp/fonts/{fontstack}/{range}.pbf", | ||
17 | "layers": [ | ||
18 | { | ||
19 | "id": "background", | ||
20 | "type": "background", | ||
21 | "paint": { | ||
22 | "background-color": "#f8f4f0" | ||
23 | } | ||
24 | } | ||
25 | ] | ||
26 | } | ||
diff --git a/snippets/json_maplibre_style_circle b/snippets/json_maplibre_style_circle new file mode 100644 index 0000000..485241c --- /dev/null +++ b/snippets/json_maplibre_style_circle | |||
@@ -0,0 +1,19 @@ | |||
1 | { | ||
2 | "id": "points", | ||
3 | "type": "circle", | ||
4 | "source": "power.points", | ||
5 | "paint": { | ||
6 | "circle-color": "red", | ||
7 | "circle-radius": [ | ||
8 | "interpolate", ["linear"], ["zoom"], | ||
9 | 10, 3, | ||
10 | 18, 10 | ||
11 | ], | ||
12 | "circle-stroke-width": [ | ||
13 | "interpolate", ["linear"], ["zoom"], | ||
14 | 8, 1, | ||
15 | 13, 3 | ||
16 | ], | ||
17 | "circle-stroke-color": "white" | ||
18 | } | ||
19 | } | ||