+ return
diff --git a/src/components/map/FeaturePropertyPopup.jsx b/src/components/map/FeaturePropertyPopup.jsx
index e61c1b5..1d5e6e3 100644
--- a/src/components/map/FeaturePropertyPopup.jsx
+++ b/src/components/map/FeaturePropertyPopup.jsx
@@ -5,11 +5,20 @@ import StringInput from '../inputs/StringInput'
import colors from '../../config/colors'
import { margins, fontSizes } from '../../config/scales'
+function displayValue(value) {
+ if (typeof value === 'undefined' || value === null) return value;
+ if (value instanceof Date) return value.toLocaleString();
+ if (typeof value === 'object' ||
+ typeof value === 'number' ||
+ typeof value === 'string') return value.toString();
+ return value;
+}
+
function renderProperties(feature) {
return Object.keys(feature.properties).map(propertyName => {
const property = feature.properties[propertyName]
- return
-
+ return
+
})
}
@@ -24,7 +33,7 @@ const Panel = (props) => {
}
function renderFeature(feature) {
- return
+ return
{feature.layer['source-layer']}
{renderProperties(feature)}