Skip to content

Commit

Permalink
Fix geometry-type filter on water to be MapLibre v5 compatible.
Browse files Browse the repository at this point in the history
* Replace [geometry-type] with  to filter geometries correctly.
  • Loading branch information
bdon committed Jan 4, 2025
1 parent 925ee75 commit f7c4991
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions styles/src/base_layers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function nolabels_layers(
{
id: "earth",
type: "fill",
filter: ["==", ["geometry-type"], "Polygon"],
filter: ["==", "$type", "Polygon"],
source: source,
"source-layer": "earth",
paint: {
Expand Down Expand Up @@ -253,7 +253,7 @@ export function nolabels_layers(
{
id: "water",
type: "fill",
filter: ["==", ["geometry-type"], "Polygon"],
filter: ["==", "$type", "Polygon"],
source: source,
"source-layer": "water",
paint: {
Expand Down

0 comments on commit f7c4991

Please sign in to comment.