This is an automated email from the ASF dual-hosted git repository.
bchapuis pushed a commit to branch legends
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git
The following commit(s) were added to refs/heads/legends by this push:
new d515b8c7 Revise historic and railway icons
d515b8c7 is described below
commit d515b8c7e1c5359c577fb1f785de9eace8ed28a1
Author: Bertil Chapuis <[email protected]>
AuthorDate: Sun Jan 7 00:19:59 2024 +0100
Revise historic and railway icons
---
basemap/layers/point/icon.js | 119 +++++++++++--------------------------------
basemap/themes/default.js | 2 +
2 files changed, 32 insertions(+), 89 deletions(-)
diff --git a/basemap/layers/point/icon.js b/basemap/layers/point/icon.js
index 5d70c2d8..3158d759 100644
--- a/basemap/layers/point/icon.js
+++ b/basemap/layers/point/icon.js
@@ -543,63 +543,6 @@ let directives = [
},
// Historic
- // {
- // filter: ['==', ['get', 'historic'], 'archaeological_site'],
- // 'icon-image': 'archaeological_site',
- // 'icon-color': theme.pointIconArchaeologicalSiteIconColor,
- // 'text-color': theme.pointIconArchaeologicalSiteTextColor,
- // },
- // {
- // filter: ['==', ['get', 'historic'], 'castle'],
- // 'icon-image': 'castle',
- // 'icon-color': theme.pointIconCastleIconColor,
- // 'text-color': theme.pointIconCastleTextColor,
- // },
- // {
- // filter: ['==', ['get', 'historic'], 'city_gate'],
- // 'icon-image': 'city_gate',
- // 'icon-color': theme.pointIconCityGateIconColor,
- // 'text-color': theme.pointIconCityGateTextColor,
- // },
- // {
- // filter: ['==', ['get', 'historic'], 'fort'],
- // 'icon-image': 'fort',
- // 'icon-color': theme.pointIconFortIconColor,
- // 'text-color': theme.pointIconFortTextColor,
- // },
- // {
- // filter: ['==', ['get', 'historic'], 'manor'],
- // 'icon-image': 'manor',
- // 'icon-color': theme.pointIconManorIconColor,
- // 'text-color': theme.pointIconManorTextColor,
- // },
- // {
- // filter: ['==', ['get', 'historic'], 'memorial'],
- // 'icon-image': 'memorial',
- // 'icon-color': theme.pointIconMemorialIconColor,
- // 'text-color': theme.pointIconMemorialTextColor,
- // },
- // {
- // filter: ['==', ['get', 'historic'], 'monument'],
- // 'icon-image': 'monument',
- // 'icon-color': theme.pointIconMonumentIconColor,
- // 'text-color': theme.pointIconMonumentTextColor,
- // },
- // {
- // filter: ['==', ['get', 'historic'], 'wayside_cross'],
- // 'icon-image': 'wayside_cross',
- // 'icon-color': theme.pointIconWaysideCrossIconColor,
- // 'text-color': theme.pointIconWaysideCrossTextColor,
- // },
- // {
- // filter: ['==', ['get', 'historic'], 'wayside_shrine'],
- // 'icon-image': 'wayside_shrine',
- // 'icon-color': theme.pointIconWayShrineIconColor,
- // 'text-color': theme.pointIconWaysideShrineTextColor,
- // },
-
-
-
{
'filter': ['==', ['get', 'historic'], 'memorial'],
'icon-image': 'memorial',
@@ -745,8 +688,6 @@ let directives = [
'text-color': theme.pointIconHistoricTextColor
},
-
-
// Leisure
{
'filter': ['==', ['get', 'leisure'], 'playground'],
@@ -1089,7 +1030,7 @@ let directives = [
// Military
{
- filter: ['==', ['get', 'military'], 'bunker'],
+ filter: ["==", ["get", "military"], "bunker"],
'icon-image': 'bunker',
'icon-color': theme.pointIconBunkerIconColor,
'text-color': theme.pointIconBunkerTextColor,
@@ -1127,46 +1068,48 @@ let directives = [
'text-color': theme.pointIconVolcanoTextColor,
},
- // Railway: stations and stops
+ // Railway
{
- filter: ['==', ['get', 'railway'], 'halt'],
+ 'filter': [
+ 'any',
+ ['==', ['get', 'railway'], 'station'],
+ ['==', ['get', 'railway'], 'halt'],
+ ['==', ['get', 'railway'], 'tram_stop']
+ ],
'icon-image': 'place-6',
'icon-color': theme.pointIconHaltIconColor,
'text-color': theme.pointIconHaltTextColor,
},
{
- filter: ['==', ['get', 'railway'], 'station'],
- 'icon-image': 'place-6',
- 'icon-color': theme.pointIconStationIconColor,
- 'text-color': theme.pointIconStationTextColor,
- },
- {
- filter: ['==', ['get', 'railway'], 'subway_entrance'],
- 'icon-image': 'entrance',
- 'icon-color': theme.pointIconSubwayEntranceIconColor,
- 'text-color': theme.pointIconSubwayEntranceTextColor,
+ "filter": [
+ "any",
+ ["==", ["get", "railway"], "level_crossing"],
+ ["==", ["get", "railway"], "crossing"]
+ ],
+ "icon-image": "level_crossing2",
+ 'icon-color': theme.pointIconRailwayIconColor,
+ 'text-color': theme.pointIconRailwayIconColor,
},
{
- filter: ['==', ['get', 'railway'], 'tram_stop'],
- 'icon-image': 'tram_stop',
- 'icon-color': theme.pointIconTramStopIconColor,
- 'text-color': theme.pointIconTramStopTextColor,
+ "filter": [
+ "any",
+ ["==", ["get", "railway"], "level_crossing"],
+ ["==", ["get", "railway"], "crossing"]
+ ],
+ "icon-image": "level_crossing",
+ 'icon-color': theme.pointIconRailwayIconColor,
+ 'text-color': theme.pointIconRailwayIconColor,
},
- // Railway: other railways
- {
- filter: ['==', ['get', 'railway'], 'crossing'],
- 'icon-image': 'level_crossing',
- 'icon-color': theme.pointIconCrossingIconColor,
- 'text-color': theme.pointIconCrossingTextColor,
- },
+ // Railway (custom)
{
- filter: ['==', ['get', 'railway'], 'level_crossing'],
- 'icon-image': 'level_crossing',
- 'icon-color': theme.pointIconLevelCrossingIconColor,
- 'text-color': theme.pointIconLevelCrossingTextColor,
+ 'filter': ['==', ['get', 'railway'], 'subway_entrance'],
+ 'icon-image': 'entrance',
+ 'icon-color': theme.pointIconRailwayIconColor,
+ 'text-color': theme.pointIconRailwayIconColor,
},
+
// Tourism
{
filter: ['==', ['get', 'tourism'], 'alpine_hut'],
@@ -1757,8 +1700,6 @@ let directives = [
// },
-
-
// To be classified
{
'filter': ['==', ['get', 'tourism'], 'artwork'],
diff --git a/basemap/themes/default.js b/basemap/themes/default.js
index e0b2eab6..9d99ed76 100644
--- a/basemap/themes/default.js
+++ b/basemap/themes/default.js
@@ -616,6 +616,8 @@ export default {
pointIconAmenityTextColor: 'rgb(199, 116, 0)',
pointIconHistoricIconColor: 'rgb(115, 74, 7)',
pointIconHistoricTextColor: 'rgb(115, 74, 7)',
+ pointIconRailwayIconColor: 'rgb(0, 146, 218)',
+ pointIconRailwayTextColor: 'rgb(0, 146, 218)',
highwayMotorwayLineWidth: [5, 0.5, 16, 7],
highwayTrunkLineWidth: [5, 0.5, 16, 6],