You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@baremaps.apache.org by le...@apache.org on 2023/06/15 11:16:05 UTC
[incubator-baremaps] 01/04: Fix layering for parks with natural and landuse
This is an automated email from the ASF dual-hosted git repository.
leonardcs pushed a commit to branch 695-display-natural=wood-layer-on-top-of-leisure=park-layer
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git
commit 16a535e946ffa516881fdbbfb1d370cbc55c60dd
Author: Leonard <le...@gmail.com>
AuthorDate: Thu Jun 15 13:03:29 2023 +0200
Fix layering for parks with natural and landuse
---
basemap/layers/landuse/background.js | 4 ----
basemap/layers/landuse/overlay.js | 4 ++++
basemap/layers/leisure/background.js | 40 ++++--------------------------------
basemap/layers/leisure/overlay.js | 37 +++++++++++++++++++++++++++++++++
basemap/layers/natural/background.js | 4 ++++
basemap/layers/natural/overlay.js | 20 ++++++++++--------
basemap/style.js | 4 ++--
7 files changed, 63 insertions(+), 50 deletions(-)
diff --git a/basemap/layers/landuse/background.js b/basemap/layers/landuse/background.js
index 02bf5af1..a26aaa5d 100644
--- a/basemap/layers/landuse/background.js
+++ b/basemap/layers/landuse/background.js
@@ -72,10 +72,6 @@ let directives = [
filter: ['==', ['get', 'landuse'], 'vineyard'],
'fill-color': 'rgb(172, 225, 161)',
},
- {
- filter: ['==', ['get', 'landuse'], 'meadow'],
- 'fill-color': 'rgb(205, 235, 176)',
- },
{
filter: ['==', ['get', 'landuse'], 'farmyard'],
'fill-color': 'rgb(238, 213, 179)',
diff --git a/basemap/layers/landuse/overlay.js b/basemap/layers/landuse/overlay.js
index d57bd0db..2e17c708 100644
--- a/basemap/layers/landuse/overlay.js
+++ b/basemap/layers/landuse/overlay.js
@@ -28,6 +28,10 @@ let directives = [
filter: ['==', ['get', 'landuse'], 'orchard'],
'fill-color': 'rgb(172, 225, 161)',
},
+ {
+ filter: ['==', ['get', 'landuse'], 'meadow'],
+ 'fill-color': 'rgb(205, 235, 176)',
+ },
];
export default asLayerObject(withFillSortKey(directives), {
diff --git a/basemap/layers/leisure/background.js b/basemap/layers/leisure/background.js
index 8f09feb9..8fb2fa68 100644
--- a/basemap/layers/leisure/background.js
+++ b/basemap/layers/leisure/background.js
@@ -12,41 +12,9 @@
import {asLayerObject, withSortKeys} from "../../utils/utils.js";
let directives = [
- {
- filter: ['==', ['get', 'leisure'], 'swimming_pool'],
- 'fill-color': 'rgb(170, 211, 223)',
- 'fill-outline-color': 'rgb(120, 183, 202)',
- },
- {
- filter: ['==', ['get', 'leisure'], 'miniature_golf'],
- 'fill-color': 'rgb(181, 226, 181)',
- },
- {
- filter: ['==', ['get', 'leisure'], 'ice_rink'],
- 'fill-color': 'rgb(221, 236, 236)',
- 'fill-outline-color': 'rgb(140, 220, 189)',
- },
{
filter: ['==', ['get', 'leisure'], 'golf_course'],
- 'fill-color': 'rgb(181, 226, 181)',
- },
- {
- filter: ['==', ['get', 'leisure'], 'garden'],
- 'fill-color': 'rgb(205, 235, 176)',
- },
- {
- filter: ['==', ['get', 'leisure'], 'dog_park'],
- 'fill-color': 'rgb(224, 252, 227)',
- },
- {
- filter: ['==', ['get', 'leisure'], 'playground'],
- 'fill-color': 'rgb(223, 252, 226)',
- 'fill-outline-color': 'rgb(164, 221, 169)',
- },
- {
- filter: ['==', ['get', 'leisure'], 'pitch'],
- 'fill-color': 'rgb(170, 224, 203)',
- 'fill-outline-color': 'rgb(151, 212, 186)',
+ 'fill-color': 'rgb(221, 246, 192)',
},
{
filter: ['==', ['get', 'leisure'], 'track'],
@@ -58,8 +26,8 @@ let directives = [
'fill-color': 'rgb(223, 252, 226)',
},
{
- filter: ['==', ['get', 'leisure'], 'stadium'],
- 'fill-color': 'rgb(223, 252, 226)',
+ filter: ['==', ['get', 'leisure'], 'garden'],
+ 'fill-color': 'rgb(205, 235, 176)',
},
{
filter: ['==', ['get', 'leisure'], 'park'],
@@ -72,7 +40,7 @@ export default asLayerObject(withSortKeys(directives), {
type: 'fill',
source: 'baremaps',
'source-layer': 'leisure',
- filter: ['==', ['geometry-type'], 'Polygon'],
+ // filter: ['==', ['geometry-type'], 'Polygon'],
layout: {
visibility: 'visible',
},
diff --git a/basemap/layers/leisure/overlay.js b/basemap/layers/leisure/overlay.js
index 67df0935..1903be1f 100644
--- a/basemap/layers/leisure/overlay.js
+++ b/basemap/layers/leisure/overlay.js
@@ -17,6 +17,43 @@ let directives = [
'fill-color': 'rgb(181, 208, 208)',
'fill-outline-color': 'rgb(164, 187, 212)',
},
+ {
+ filter: ['==', ['get', 'leisure'], 'swimming_pool'],
+ 'fill-color': 'rgb(170, 211, 223)',
+ 'fill-outline-color': 'rgb(120, 183, 202)',
+ },
+ {
+ filter: ['==', ['get', 'leisure'], 'fitness_station'],
+ 'fill-color': 'rgb(223, 252, 226)',
+ 'fill-outline-color': 'rgb(164, 221, 169)',
+ },
+ {
+ filter: ['==', ['get', 'leisure'], 'miniature_golf'],
+ 'fill-color': 'rgb(181, 226, 181)',
+ },
+ {
+ filter: ['==', ['get', 'leisure'], 'ice_rink'],
+ 'fill-color': 'rgb(221, 236, 236)',
+ 'fill-outline-color': 'rgb(140, 220, 189)',
+ },
+ {
+ filter: ['==', ['get', 'leisure'], 'dog_park'],
+ 'fill-color': 'rgb(224, 252, 227)',
+ },
+ {
+ filter: ['==', ['get', 'leisure'], 'playground'],
+ 'fill-color': 'rgb(223, 252, 226)',
+ 'fill-outline-color': 'rgb(164, 221, 169)',
+ },
+ {
+ filter: ['==', ['get', 'leisure'], 'pitch'],
+ 'fill-color': 'rgb(170, 224, 203)',
+ 'fill-outline-color': 'rgb(151, 212, 186)',
+ },
+ {
+ filter: ['==', ['get', 'leisure'], 'stadium'],
+ 'fill-color': 'rgb(223, 252, 226)',
+ },
];
export default asLayerObject(withSortKeys(directives), {
diff --git a/basemap/layers/natural/background.js b/basemap/layers/natural/background.js
index 59241784..38ca5156 100644
--- a/basemap/layers/natural/background.js
+++ b/basemap/layers/natural/background.js
@@ -20,6 +20,10 @@ let directives = [
filter: ['==', ['get', 'natural'], 'wood'],
'fill-color': 'rgb(157, 202, 138)'
},
+ {
+ filter: ['==', ['get', 'natural'], 'scrub'],
+ 'fill-color': 'rgb(201, 216, 173)'
+ },
{
filter: ['==', ['get', 'natural'], 'heath'],
'fill-color': 'rgb(214, 217, 159)'
diff --git a/basemap/layers/natural/overlay.js b/basemap/layers/natural/overlay.js
index 571d0d29..475b15eb 100644
--- a/basemap/layers/natural/overlay.js
+++ b/basemap/layers/natural/overlay.js
@@ -12,6 +12,18 @@
import {asLayerObject, withSortKeys} from "../../utils/utils.js";
let directives = [
+ {
+ filter: ['==', ['get', 'natural'], 'wetland'],
+ 'fill-color': 'rgba(213, 231, 211, 0.5)'
+ },
+ {
+ filter: [
+ 'all',
+ ['==', ['get', 'natural'], 'beach'],
+ ['==', ['get', 'surface'], 'gravel']
+ ],
+ 'fill-color': 'rgb(171, 205, 214)'
+ },
{
filter: ['==', ['get', 'natural'], 'beach'],
'fill-color': 'rgb(255, 241, 186)'
@@ -20,10 +32,6 @@ let directives = [
filter: ['==', ['get', 'natural'], 'sand'],
'fill-color': 'rgb(240, 229, 196)'
},
- {
- filter: ['==', ['get', 'natural'], 'scrub'],
- 'fill-color': 'rgb(201, 216, 173)'
- },
{
filter: [
'all',
@@ -32,10 +40,6 @@ let directives = [
],
'fill-color': 'rgb(170, 211, 223)',
},
- {
- filter: ['==', ['get', 'natural'], 'wetland'],
- 'fill-color': 'rgb(213, 231, 211)'
- },
];
export default asLayerObject(withSortKeys(directives), {
diff --git a/basemap/style.js b/basemap/style.js
index a5ec7684..9bf6e4c0 100644
--- a/basemap/style.js
+++ b/basemap/style.js
@@ -78,9 +78,9 @@ export default {
power_background,
aeroway_polygon,
landuse_background,
- natural_background,
- amenity_background,
leisure_background,
+ amenity_background,
+ natural_background,
landuse_overlay,
natural_overlay,
amenity_overlay,