From 0433d66f45b55ed0cf7a4b427f5872b76bbaf3b6 Mon Sep 17 00:00:00 2001 From: pathmapper Date: Sat, 18 Apr 2020 11:25:54 +0200 Subject: [PATCH 1/2] Add feature id to FeaturePropertyPopup --- src/components/map/FeaturePropertyPopup.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/map/FeaturePropertyPopup.jsx b/src/components/map/FeaturePropertyPopup.jsx index 56f33ae..d3b959b 100644 --- a/src/components/map/FeaturePropertyPopup.jsx +++ b/src/components/map/FeaturePropertyPopup.jsx @@ -21,12 +21,19 @@ function renderProperties(feature) { }) } +function renderFeatureId(feature) { + return + + + } + function renderFeature(feature, idx) { return
{feature.layer['source-layer']}{feature.inspectModeCounter && × {feature.inspectModeCounter}}
+ {renderFeatureId(feature)} {renderProperties(feature)}
} @@ -36,7 +43,7 @@ function removeDuplicatedFeatures(features) { features.forEach(feature => { const featureIndex = uniqueFeatures.findIndex(feature2 => { - return feature.layer['source-layer'] === feature2.layer['source-layer'] + return feature.layer['source-layer'] === feature2.layer['source-layer'] && JSON.stringify(feature.properties) === JSON.stringify(feature2.properties) }) From 4517148e5a0faa8705f83d957ddac1f48ec0f5b9 Mon Sep 17 00:00:00 2001 From: pathmapper Date: Sat, 18 Apr 2020 11:43:52 +0200 Subject: [PATCH 2/2] Add underscore to label --- src/components/map/FeaturePropertyPopup.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/map/FeaturePropertyPopup.jsx b/src/components/map/FeaturePropertyPopup.jsx index d3b959b..7c85346 100644 --- a/src/components/map/FeaturePropertyPopup.jsx +++ b/src/components/map/FeaturePropertyPopup.jsx @@ -22,7 +22,7 @@ function renderProperties(feature) { } function renderFeatureId(feature) { - return + return }