Skip to content

Commit

Permalink
[basemap] show states when zoomed out farther
Browse files Browse the repository at this point in the history
Currently state boundaries are only visible when zoomed way in.

For small countries with relatively many states this could get a bit
cluttered when zoomed out. I tried to balance the design trade-offs
between large countries and small countries.

It'd be nice if we knew which country (admin_2) that a given "state"
boundary (admin_level_3/4) belonged to, but this isn't included in the
opentiles schema.

I might look at modifying planetiler for this purpose at some point, but
for right now it seems like more work than I'm prepared to commit.
  • Loading branch information
michaelkirk committed Jan 24, 2024
1 parent 857e703 commit 25ecfcb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions services/tileserver/styles/basic/style.json
Original file line number Diff line number Diff line change
Expand Up @@ -1695,18 +1695,18 @@
"type": "line",
"source": "openmaptiles",
"source-layer": "boundary",
"minzoom": 8,
"filter": ["all", ["in", "admin_level", 3, 4]],
"minzoom": 3,
"filter": ["in", "admin_level", 3, 4],
"layout": { "line-join": "round" },
"paint": {
"line-color": "#9e9cab",
"line-dasharray": [5, 1],
"line-color": "#747980",
"line-dasharray": [1.5, 1.5],
"line-width": {
"base": 1,
"stops": [
[4, 0.4],
[5, 1],
[12, 1.8]
[3, 0.6],
[6, 1],
[10, 2]
]
}
}
Expand Down

0 comments on commit 25ecfcb

Please sign in to comment.