From 1f57d82cd2f02cdd7d7afde16e5a70afa51cc7b4 Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Mon, 27 May 2024 21:00:23 -0400 Subject: [PATCH 1/3] add icons for capitals of admin_level 5 and 6 --- icons/place_dot_in_circle.svg | 4 ++++ src/layer/place.js | 42 ++++++++++++++++++++++++----------- 2 files changed, 33 insertions(+), 13 deletions(-) create mode 100644 icons/place_dot_in_circle.svg diff --git a/icons/place_dot_in_circle.svg b/icons/place_dot_in_circle.svg new file mode 100644 index 000000000..96133cea2 --- /dev/null +++ b/icons/place_dot_in_circle.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/layer/place.js b/src/layer/place.js index a034b8d32..1020e7be3 100644 --- a/src/layer/place.js +++ b/src/layer/place.js @@ -34,6 +34,22 @@ const minorLocationStepFilter = [ [">=", ["get", "rank"], 1], ]; +const iconImage = [ + "match", + ["get", "capital"], + 2, + "place_star_in_circle", + 3, + "place_star", + 4, + "place_star", + 5, + "place_dot_in_circle", + 6, + "place_dot_in_circle", + "place_dot", +]; + function filterPlace(type) { return ["==", ["get", "class"], type]; } @@ -53,7 +69,7 @@ export const village = { [12, 12], ], }, - "icon-image": "place_dot", + "icon-image": iconImage, "icon-size": { base: 1.0, stops: [ @@ -100,7 +116,7 @@ export const town = { [12, 18], ], }, - "icon-image": "place_dot", + "icon-image": iconImage, "icon-size": { base: 1.2, stops: [ @@ -159,17 +175,7 @@ export const city = { [11, 24], ], }, - "icon-image": [ - "match", - ["get", "capital"], - 2, - "place_star_in_circle", - 3, - "place_star", - 4, - "place_star", - "place_dot", - ], + "icon-image": iconImage, "icon-size": { base: 1.2, stops: [ @@ -451,4 +457,14 @@ export const legendEntries = [ layers: populatedPlaceLayers, filter: ["==", ["get", "capital"], 4], }, + { + description: "Division capital", + layers: populatedPlaceLayers, + filter: ["==", ["get", "capital"], 5], + }, + { + description: "County seat or local capital", + layers: populatedPlaceLayers, + filter: ["==", ["get", "capital"], 6], + }, ]; From 46b4aca6de76af59545bc78383dafa91a43f0360 Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Wed, 29 May 2024 19:37:31 -0400 Subject: [PATCH 2/3] reword legend entries for capital=5 and capital=6 --- src/layer/place.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layer/place.js b/src/layer/place.js index 1020e7be3..611199a7d 100644 --- a/src/layer/place.js +++ b/src/layer/place.js @@ -458,12 +458,12 @@ export const legendEntries = [ filter: ["==", ["get", "capital"], 4], }, { - description: "Division capital", + description: "Local capital", layers: populatedPlaceLayers, filter: ["==", ["get", "capital"], 5], }, { - description: "County seat or local capital", + description: "County seat or equivalent", layers: populatedPlaceLayers, filter: ["==", ["get", "capital"], 6], }, From f293eb9dbb9a3019ee89066e25fe2587630735ab Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Thu, 30 May 2024 09:32:35 -0400 Subject: [PATCH 3/3] adjust whitespace in dot-in-circle icon --- icons/place_dot_in_circle.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icons/place_dot_in_circle.svg b/icons/place_dot_in_circle.svg index 96133cea2..4b2703c0e 100644 --- a/icons/place_dot_in_circle.svg +++ b/icons/place_dot_in_circle.svg @@ -1,4 +1,4 @@ - +