Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

wip

Benjamin Kingca3c69012383
diff --git a/config/default/common/vectorstyles/GRanD_Dams_v1.01_STD.json b/config/default/common/vectorstyles/GRanD_Dams_v1.01_STD.json
index fc285350f..bf5c8da89 100644
--- a/config/default/common/vectorstyles/GRanD_Dams_v1.01_STD.json
+++ b/config/default/common/vectorstyles/GRanD_Dams_v1.01_STD.json
@@ -17,7 +17,7 @@
"source-description": "Default",
"type": "circle",
"paint": {
- "circle-radius": 1,
+ "circle-radius": 1.5,
"circle-color": [
"case",
[
diff --git a/config/default/common/vectorstyles/Nuclear_Power_Plant_Locations_v1_STD.json b/config/default/common/vectorstyles/Nuclear_Power_Plant_Locations_v1_STD.json
index 17071997f..79876dee2 100644
--- a/config/default/common/vectorstyles/Nuclear_Power_Plant_Locations_v1_STD.json
+++ b/config/default/common/vectorstyles/Nuclear_Power_Plant_Locations_v1_STD.json
@@ -19,10 +19,33 @@
"paint": {
"circle-radius": {
"base": 2,
- "stops": [[12, 1], [22, 7]]
+ "stops": [
+ [
+ 12,
+ 1
+ ],
+ [
+ 22,
+ 3.5
+ ]
+ ]
+ },
+ "circle-stroke-color": "rgb(204, 204, 204)",
+ "circle-stroke-width": {
+ "base": 0.02,
+ "stops": [
+ [
+ 12,
+ 0.02
+ ],
+ [
+ 22,
+ 0.5
+ ]
+ ]
},
"circle-color": "rgb(165, 42, 42)"
}
}
]
-}
+}
\ No newline at end of file
diff --git a/web/js/modules/vector-styles/selectors.js b/web/js/modules/vector-styles/selectors.js
index 7ab25b09d..5fdc8f399 100644
--- a/web/js/modules/vector-styles/selectors.js
+++ b/web/js/modules/vector-styles/selectors.js
@@ -145,8 +145,11 @@ export function setStyleFunction(def, vectorStyleId, vectorStyles, layer, state)
layer.setStyle(function (feature, resolution) {
const data = state.config.vectorData[def.vectorData.id];
+ const properties = data.mvt_properties;
const features = feature.getProperties();
- if (def.uniqueIdenitifier && selectedFeatures && selectedFeatures.includes(features[def.uniqueIdenitifier])) {
+ const titleKey = lodashFind(properties, { Function: 'Identify' })['Identifier'];
+ const uniqueIdentifier = features[titleKey];
+ if (uniqueIdentifier && selectedFeatures && selectedFeatures.includes(uniqueIdentifier)) {
return selectedStyleFunction(feature, styleFunction(feature, resolution));
} else {
return styleFunction(feature, resolution);
diff --git a/web/js/modules/vector-styles/util.js b/web/js/modules/vector-styles/util.js
index 8a8fff63b..8fbfcc43e 100644
--- a/web/js/modules/vector-styles/util.js
+++ b/web/js/modules/vector-styles/util.js
@@ -110,10 +110,12 @@ export function onMapClickGetVectorFeatures(e, map, store) {
const vectorDataId = def.vectorData.id;
const data = config.vectorData[vectorDataId];
const properties = data.mvt_properties;
- const titleKey = lodashFind(properties, { Function: 'Identify' })['Identifier'];
- const featureId = features[def.uniqueIdenitifier];
+ const uniqueIdentifierKey = lodashFind(properties, { Function: 'Identify' })['Identifier'];
+ const titleKey = lodashFind(properties, { IsTitle: true })['Identifier'];
+
+ const uniqueIdentifier = features[uniqueIdentifierKey];
const title = features[titleKey];
- if (selected[layerId].includes(title)) return
+ if (selected[layerId].includes(uniqueIdentifier)) return
const obj = {
legend: properties,
features: features,
@@ -122,7 +124,7 @@ export function onMapClickGetVectorFeatures(e, map, store) {
featureTitle: title
};
metaArray.push(obj);
- selected[layerId].push(featureId);
+ selected[layerId].push(uniqueIdentifier);
}
});