Skip to content

Commit

Permalink
Bus stops bridges (#180)
Browse files Browse the repository at this point in the history
* fix bus stops pmap:kind in POI layer [#163]

* Layer reordering for bridges and water [#67]
* move pedestrian landuse over water
* move water strokes to be just over water polygons
  • Loading branch information
bdon authored Nov 11, 2023
1 parent 22a999e commit 5df914b
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 45 deletions.
88 changes: 44 additions & 44 deletions styles/src/base_layers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,6 @@ export function nolabels_layers(
],
},
},
{
id: "landuse_pedestrian",
type: "fill",
source: source,
"source-layer": "landuse",
filter: ["any", ["==", "pmap:kind", "pedestrian"]],
paint: {
"fill-color": t.pedestrian,
},
},
{
id: "natural_scrub",
type: "fill",
Expand Down Expand Up @@ -258,6 +248,50 @@ export function nolabels_layers(
"fill-color": t.water,
},
},
{
id: "physical_line_stream",
type: "line",
source: source,
"source-layer": "physical_line",
minzoom: 14,
filter: ["all", ["in", "pmap:kind", "stream"]],
paint: {
"line-color": t.water,
"line-width": 0.5,
},
},
{
id: "physical_line_river",
type: "line",
source: source,
"source-layer": "physical_line",
minzoom: 9,
filter: ["all", ["in", "pmap:kind", "river"]],
paint: {
"line-color": t.water,
"line-width": [
"interpolate",
["exponential", 1.6],
["zoom"],
9,
0,
9.5,
1.0,
18,
12,
],
},
},
{
id: "landuse_pedestrian",
type: "fill",
source: source,
"source-layer": "landuse",
filter: ["any", ["==", "pmap:kind", "pedestrian"]],
paint: {
"fill-color": t.pedestrian,
},
},
{
id: "landuse_pier",
type: "fill",
Expand Down Expand Up @@ -623,40 +657,6 @@ export function nolabels_layers(
],
},
},
{
id: "physical_line_stream",
type: "line",
source: source,
"source-layer": "physical_line",
minzoom: 14,
filter: ["all", ["in", "pmap:kind", "stream"]],
paint: {
"line-color": t.water,
"line-width": 0.5,
},
},
{
id: "physical_line_river",
type: "line",
source: source,
"source-layer": "physical_line",
minzoom: 9,
filter: ["all", ["in", "pmap:kind", "river"]],
paint: {
"line-color": t.water,
"line-width": [
"interpolate",
["exponential", 1.6],
["zoom"],
9,
0,
9.5,
1.0,
18,
12,
],
},
},
{
id: "buildings",
type: "fill",
Expand Down
2 changes: 1 addition & 1 deletion tiles/src/main/java/com/protomaps/basemap/Basemap.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public String description() {

@Override
public String version() {
return "3.0.0-pre1";
return "3.0.0-pre2";
}

@Override
Expand Down
1 change: 1 addition & 0 deletions tiles/src/main/java/com/protomaps/basemap/layers/Pois.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public void processFeature(SourceFeature sf, FeatureCollector features) {
kind = sf.getString("tourism");
minZoom = 15;
} else if (sf.hasTag("highway", "bus_stop")) {
kind = sf.getString("highway");
minZoom = 17;
} else {
// Avoid problem of too many "other" kinds
Expand Down
13 changes: 13 additions & 0 deletions tiles/src/test/java/com/protomaps/basemap/layers/PoisTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,17 @@ void simple() {
0
)));
}

@Test
void busStop() {
assertFeatures(15,
List.of(Map.of("pmap:kind", "bus_stop", "pmap:min_zoom", 18)),
process(SimpleFeature.create(
newPoint(1, 1),
new HashMap<>(Map.of("highway", "bus_stop")),
"osm",
null,
0
)));
}
}

0 comments on commit 5df914b

Please sign in to comment.