From a4f6fda803190653b995a5ce18aaaeeac860f74f Mon Sep 17 00:00:00 2001 From: Doug Johnson Date: Thu, 28 Aug 2025 16:56:41 -0700 Subject: [PATCH 1/3] Fix OGM legend width for short descriptions --- src/components/Legend.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Legend.jsx b/src/components/Legend.jsx index 6198e837..a304fe2f 100644 --- a/src/components/Legend.jsx +++ b/src/components/Legend.jsx @@ -234,7 +234,7 @@ const LegendGroup = ({ title, children }) => { ) return children && children.length > 0 && ( - + {title ? titleElement : null} {group?.subheading && ( Date: Thu, 28 Aug 2025 16:57:50 -0700 Subject: [PATCH 2/3] Move original CulturalFoods layer --- src/data/layers/CulturalFoods.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/data/layers/CulturalFoods.jsx b/src/data/layers/CulturalFoods.jsx index 7bcdb86b..a9d0eafb 100644 --- a/src/data/layers/CulturalFoods.jsx +++ b/src/data/layers/CulturalFoods.jsx @@ -1,14 +1,14 @@ import { mapPopupContent, ogmFeaturesLink, pointToIcon } from '../LeafletStyleHelpers'; const layer = { - title: 'Cultural Foods', + title: 'Cultural Foods - Iyé Creative', description: [ - {type: 'p', content: "Locations of stores and restaurants that provide access to Cultural Foods."}, - {type: 'p', content: 'Based on the Greater Victoria Cultural Food Community Map by UVic Community Mapping students in collaboration with Iyé Creative.'}, + {type: 'p', content: "Iyé Creative worked with the UVic Community Mapping students to create this data set of cultural restaurants and food stores on Southern Vancouver Island."}, + {type: 'link', content: 'Visit Iyé Creative.', url: 'https://www.iyeherstories.com/'}, {type: 'link', content: 'Learn about Cultural Food access in Greater Victoria from their StoryMap.', url: 'https://storymaps.arcgis.com/stories/06ee241047d8455bbb02230f453f2edc'}, ], data: ogmFeaturesLink('64836448cea704010006d251'), - ogmMapId: '64836448cea704010006d251', + //ogmMapId: '64836448cea704010006d251', shape: 'point', symbology: 'classified', options: { From 02bf7592497a3b03b448918ac190eec53d1c238a Mon Sep 17 00:00:00 2001 From: Doug Johnson Date: Thu, 28 Aug 2025 16:58:15 -0700 Subject: [PATCH 3/3] Add CulturalFoods and CultureCompass OGM layers --- src/data/layers/CulturalFoodsOGM.jsx | 50 ++++++++++++++++++++++++++ src/data/layers/CultureCompassOGM.jsx | 50 ++++++++++++++++++++++++++ src/data/questions/BeHappy.jsx | 1 + src/data/questions/CreateCommunity.jsx | 5 ++- src/data/questions/EatLocal.jsx | 3 +- 5 files changed, 107 insertions(+), 2 deletions(-) create mode 100644 src/data/layers/CulturalFoodsOGM.jsx create mode 100644 src/data/layers/CultureCompassOGM.jsx diff --git a/src/data/layers/CulturalFoodsOGM.jsx b/src/data/layers/CulturalFoodsOGM.jsx new file mode 100644 index 00000000..6eb3e08a --- /dev/null +++ b/src/data/layers/CulturalFoodsOGM.jsx @@ -0,0 +1,50 @@ +import { mapPopupContent, pointToIcon, ogmFeaturesLink } from '../LeafletStyleHelpers'; + +const layer = { + title: 'Cultural Foods', + description: [ + {type: 'p', content: "This is a map to plot local cultural food places."}, + ], + data: ogmFeaturesLink('68afbbf5b4508a0100cb776c'), + ogmMapId: '68afbbf5b4508a0100cb776c', + shape: 'point', + symbology: 'classified', + options: { + pointToLayer: (f,l) => pointToIcon(l, { + icon: f.properties.icons.length > 0 ? + {f.properties?.name : null + }, 32, 0 + ), + onEachFeature: (f,l) => { + const imageURL = f.properties.pictures[0] + ? `https://greenmap.org/api-v1/pictures/${f.properties.pictures[0]}/picture/sm` + : null; + + l.bindPopup(mapPopupContent( + f.properties.name, + f.properties?.description?.blocks.filter((b) => b.type === "paragraph")[0]?.data.text ?? '', + `https://greenmap.org/browse/sites/${f.properties._id}`, + 'Show More at GreenMap.org', + imageURL + ), {offset: [0,-6]}); + } + }, + liveOverride: { + btn1: { + label: 'Plot Foods Here', + url: 'https://greenmap.org/explore/survey/68ae4104cdfbed010007727a', + }, + btn2: { + //label: 'View Map', + url: 'https://greenmap.org/explore/maps/68afbbf5b4508a0100cb776c', + }, + ogmNoAccountWarning: true, + }, +} + +export default layer; \ No newline at end of file diff --git a/src/data/layers/CultureCompassOGM.jsx b/src/data/layers/CultureCompassOGM.jsx new file mode 100644 index 00000000..31646e8c --- /dev/null +++ b/src/data/layers/CultureCompassOGM.jsx @@ -0,0 +1,50 @@ +import { mapPopupContent, pointToIcon, ogmFeaturesLink } from '../LeafletStyleHelpers'; + +const layer = { + title: 'Culture Compass', + description: [ + {type: 'p', content: "This is for plotting local cultural art and performance spaces."}, + ], + data: ogmFeaturesLink('68afc26db4508a0100cb7785'), + ogmMapId: '68afc26db4508a0100cb7785', + shape: 'point', + symbology: 'classified', + options: { + pointToLayer: (f,l) => pointToIcon(l, { + icon: f.properties.icons.length > 0 ? + {f.properties?.name : null + }, 32, 0 + ), + onEachFeature: (f,l) => { + const imageURL = f.properties.pictures[0] + ? `https://greenmap.org/api-v1/pictures/${f.properties.pictures[0]}/picture/sm` + : null; + + l.bindPopup(mapPopupContent( + f.properties.name, + f.properties?.description?.blocks.filter((b) => b.type === "paragraph")[0]?.data.text ?? '', + `https://greenmap.org/browse/sites/${f.properties._id}`, + 'Show More at GreenMap.org', + imageURL + ), {offset: [0,-6]}); + } + }, + liveOverride: { + btn1: { + label: 'Plot Culture Here', + url: 'https://greenmap.org/explore/survey/68afb531fbd3bc01001bfc91', + }, + btn2: { + //label: 'View Map', + url: 'https://greenmap.org/explore/maps/68afc26db4508a0100cb7785', + }, + ogmNoAccountWarning: true, + }, +} + +export default layer; \ No newline at end of file diff --git a/src/data/questions/BeHappy.jsx b/src/data/questions/BeHappy.jsx index d32e552d..e1e8d8ed 100644 --- a/src/data/questions/BeHappy.jsx +++ b/src/data/questions/BeHappy.jsx @@ -23,6 +23,7 @@ const Question = { { key: 'NativeLandDigitalTerritories', active: false, group: 'Indigenous' }, { key: 'NativeLandDigitalTreaties', active: false, group: 'Indigenous' }, { key: 'NatureInspiredPlaygrounds', active: true, ...LegendGroups.OGM }, + { key: "CultureCompassOGM", active: true, ...LegendGroups.OGM }, ], sections: { one: [ diff --git a/src/data/questions/CreateCommunity.jsx b/src/data/questions/CreateCommunity.jsx index e3a36d16..07658b90 100644 --- a/src/data/questions/CreateCommunity.jsx +++ b/src/data/questions/CreateCommunity.jsx @@ -30,7 +30,7 @@ const Question = { { key: 'CoastalFloodInundationScenarios', active: false, group: 'Water' }, { key: 'CRD_Parks', active: false, group: 'Greenspace' }, { key: 'CRDBikeMap', active: false, group: 'Civic' }, - { key: 'CulturalFoods', active: false, ...LegendGroups.OGM }, + { key: 'CulturalFoods', active: false, group: 'Food' }, { key: 'DrinkingFountains', active: false, group: 'Civic' }, { key: 'ENBS', active: false, group: 'Greenspace' }, { key: 'EVChargingStations', active: false, group: 'Energy' }, @@ -81,6 +81,9 @@ const Question = { { key: 'VictoriaShelters', active: false, group: 'Community' }, { key: 'WatershedRunoffAbsorption', active: false, group: 'Water' }, { key: 'Watersheds', active: false, group: 'Water' }, + + { key: "CulturalFoodsOGM", active: false, ...LegendGroups.OGM }, + { key: "CultureCompassOGM", active: false, ...LegendGroups.OGM }, ], sections: { one: [ diff --git a/src/data/questions/EatLocal.jsx b/src/data/questions/EatLocal.jsx index f64143d7..99663c56 100644 --- a/src/data/questions/EatLocal.jsx +++ b/src/data/questions/EatLocal.jsx @@ -20,7 +20,8 @@ const Question = { { key: "ShellfishPO", active: false, ...LegendGroups.StartOff }, { key: "FarmToFork", active: false, ...LegendGroups.OGM }, { key: "Pollinators", active: false, ...LegendGroups.OGM }, - { key: "CulturalFoods", active: true, ...LegendGroups.OGM }, + { key: "CulturalFoods", active: false, ...LegendGroups.StartOff }, + { key: "CulturalFoodsOGM", active: true, ...LegendGroups.OGM }, ], sections: { one: [