Skip to content

Commit b1171e6

Browse files
committed
Switch to maptiler streets style by default and try to detangle zorder
stuff a bit Streets-v2 looks most understandable as a basemap, even though it is kind of visually busy. Labels are frequent. Train station icons are missing for UK.
1 parent 1b64fae commit b1171e6

File tree

4 files changed

+25
-16
lines changed

4 files changed

+25
-16
lines changed

web/src/common/BasemapPicker.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Basemap:
99
<select bind:value={$maptilerBasemap}>
1010
<option value="dataviz">MapTiler Dataviz</option>
11-
<option value="streets">MapTiler Streets</option>
11+
<option value="streets-v2">MapTiler Streets</option>
1212
<option value="hybrid">MapTiler Satellite</option>
1313
<option value="uk-openzoomstack-light">OS Open Zoomstack</option>
1414
</select>

web/src/common/highlight_roads.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ export function getRoadLayerNames(map: Map, mapStyle: string): string[] {
1616
if (mapStyle == "hybrid") {
1717
return ["Path", "Road", "Tunnel"].filter((l) => availableLayers.has(l));
1818
}
19-
if (mapStyle == "streets") {
19+
// TODO Check if this is true in the new version
20+
if (mapStyle == "streets-v2") {
2021
let layers = [];
2122
for (let outer of ["road", "bridge", "tunnel"]) {
2223
for (let inner of [

web/src/common/zorder.ts

+21-13
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,30 @@ function getBeforeId(layerId: string): string | undefined {
5252
return beforeId;
5353
}
5454

55+
// Dummy functions just used for documentation below.
56+
let streets = (x: string) => x;
57+
//let satellite = (x: string) => x;
58+
let dataviz = (x: string) => x;
59+
//let zoomstack = (x: string) => x;
60+
5561
// All layer IDs used with layerId must be defined here, with later entries
5662
// drawn on top.
57-
//
58-
// This list covers all pages. We should maybe split it.
63+
64+
// TODO The order itself needs to change when the basemap does, because dataviz
65+
// and zoomstack are mutually incompatible (buildings and 0 restricted road
66+
// ordering).
67+
68+
// Helpful docs:
69+
// https://docs.maptiler.com/schema/planet/
70+
// https://cloud.maptiler.com/maps/streets-v2/
5971
const layerZorder = [
60-
// MapTiler basemap
61-
// TODO Handle all basemaps now
62-
"Background",
72+
streets(dataviz("Background")),
6373

64-
// TODO These don't show up at low zoom, I think because Residential is hidden
74+
// Ferry line starts at zoom 6, so these won't be visible before that -- but
75+
// that's fine; a boundary is too small to see before zoom 6 anyway
6576
"neighbourhood-boundaries",
6677

67-
// MapTiler basemap
68-
// TODO Need to play with what looks best, but this is good enough
69-
"Residential",
78+
streets("Ferry line"),
7079

7180
"debug-borders",
7281
"debug-crosses",
@@ -80,8 +89,7 @@ const layerZorder = [
8089
"shortcuts",
8190
"shortcuts-focus",
8291

83-
// MapTiler basemap
84-
"Building",
92+
dataviz("Building"),
8593

8694
"route-debug-nodes",
8795
"route-points",
@@ -90,8 +98,8 @@ const layerZorder = [
9098

9199
"one-ways",
92100

93-
// MapTiler basemap
94-
"Road labels",
101+
dataviz("Road labels"),
102+
streets("road_label"),
95103

96104
"animate-shortcuts",
97105

web/src/stores.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export type Mode =
3939
};
4040

4141
export let map: Writable<Map | null> = writable(null);
42-
export let maptilerBasemap: Writable<string> = writable("dataviz");
42+
export let maptilerBasemap: Writable<string> = writable("streets-v2");
4343

4444
export let useLocalVite: Writable<boolean> = writable(false);
4545
// The exact key in local storage

0 commit comments

Comments
 (0)