Skip to content

Commit

Permalink
Merge pull request #199 from doug-stormtree/add-green-blue-belt
Browse files Browse the repository at this point in the history
Add GreenBlueBelt and ENBS logo icon
  • Loading branch information
doug-stormtree authored Sep 26, 2024
2 parents 9c101da + bcb2656 commit 4e504d1
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 2 deletions.
35 changes: 35 additions & 0 deletions src/data/geojson/GreenBlueBelt.geojson

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/data/layers/ENBS.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { mapPopupContent, pointToIcon } from "../LeafletStyleHelpers";
import { ReactComponent as SpecialSiteIcon } from '../svg/special site icon.svg';
import { ReactComponent as SpecialSiteIcon } from '../svg/ENBS.svg';

const iconStyle = {
icon: (<SpecialSiteIcon />),
Expand Down
76 changes: 76 additions & 0 deletions src/data/layers/GreenBlueBelt.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import { getStyleMapProperty, mapPopupContent, setStyleIfSupported } from '../LeafletStyleHelpers';

const hoverStyle = {
out: {
opacity: 0.6,
fillOpacity: 0.4,
},
over: {
opacity: 1,
fillOpacity: 0.6,
},
}

const styleMap = new Map([
['Provincial Ecoreserve', { fillColor: '#00441b' }],
['Provincial Park', { fillColor: '#006d2c' }],
['Provincial Park (Water)', { fillColor: '#4eb3d3' }],
['Regional Park', { fillColor: '#41ae76' }],
['Water', { fillColor: '#2b8cbe' }],
['Water Supply Area', { fillColor: '#7bccc4' }],
]);

const layer = {
title: 'Sea-to-Sea Green Blue Belt',
description: [
{type: 'p', content: 'The Sea-to-Sea Green Blue Belt is a connected series of parks, greenspace, protected lands, and water bodies between Saanich Inlet and the Sooke Basin. Ecosystem connectivity is essential for forest, wildlife, and marine health. The campaign to establish a protected corridor began in the early 1990s and has been the work of many environmental and community organizations.'},
{type: 'link', content: 'Read about the campaign history from this 1999 report by the Wilderness Committee.', url: 'https://www.wildernesscommittee.org/publications/victorias-sea-sea-green-blue-belt'},
{type: 'link', content: 'Visit the CRD page for Sea to Sea Regional Park for updates on one of the largest parks in the belt.', url: 'https://www.crd.bc.ca/parks-recreation-culture/parks-trails/find-park-trail/seatosea'},
{type: 'link', content: 'Visit the CRD page for the Greater Victoria Water Supply Area to learn about drinking water resevoir lands protection in the region.', url: 'https://www.crd.bc.ca/service/drinking-water/watershed-protection/greater-victoria-water-supply-area'},
],
data: require('../geojson/GreenBlueBelt.geojson'),
shape: 'polygon',
symbology: 'classified',
styleMap: styleMap,
options: {
style: function (feature) {
const baseStyle = {
stroke: true,
dashArray: '',
lineCap: 'butt',
lineJoin: 'miter',
weight: 3,
fill: true,
}
return {
...baseStyle,
...hoverStyle.out,
fillColor: getStyleMapProperty(
'fillColor',
feature.properties.Type,
styleMap
),
color: getStyleMapProperty(
'fillColor',
feature.properties.Type,
styleMap
),
}
},
onEachFeature: (f,l) => {
l.bindPopup(mapPopupContent(
f.properties.Name,
'This ' + (f.properties.Type === 'Water' ? 'body of water' : f.properties.Type) +
' is part of the Sea-to-Sea Green/Blue Belt, a 62 kilometre long greenbelt within the Capital Regional District.',
'https://en.wikipedia.org/wiki/Sea_to_Sea_Green_Blue_Belt',
'Sea to Sea Green Blue Belt - Wikipedia',
), {offset: [4,2]});
l.on({
mouseover: (e) => setStyleIfSupported(e, hoverStyle.over),
mouseout: (e) => setStyleIfSupported(e, hoverStyle.out),
});
}
},
}

export default layer;
3 changes: 2 additions & 1 deletion src/data/questions/BeHealthy.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ const Question = {
layers: [
{ key: 'BigTrees', active: true, group: 'Trees' },
{ key: 'CarbonSequestration', active: false, group: 'Landcover' },
{ key: 'CherryTrees', active: true, group: 'Trees' },
{ key: 'CherryTrees', active: false, group: 'Trees' },
{ key: 'CommunityMaps', active: true, group: 'Community'},
{ key: 'ENBS', active: true, group: 'Community' },
{ key: 'GreenBlueBelt', active: false, group: 'Landcover' },
{ key: 'MaltbyLakeBirdsong', active: true, group: 'Landcover' },
{ key: 'Pollinators', active: true, ...LegendGroups.OGM },
{ key: 'SensitiveEcosystems', active: false, group: 'Landcover' },
Expand Down
1 change: 1 addition & 0 deletions src/data/questions/CreateCommunity.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const Question = {
{ key: 'EVChargingStations', active: false, group: 'Energy' },
{ key: 'FoodSecurity', active: false, group: 'Community' },
{ key: 'ForageFish', active: false, group: 'Water' },
{ key: 'GreenBlueBelt', active: false, group: 'Greenspace' },
{ key: 'GreenhouseGasOnRoad2020', active: false, group: 'Energy' },
{ key: 'GreenhouseGasOnRoad2022', active: false, group: 'Energy' },
{ key: 'GreenhouseGasStationary2020', active: false, group: 'Energy' },
Expand Down
1 change: 1 addition & 0 deletions src/data/svg/ENBS.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4e504d1

Please sign in to comment.