Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

separate size/units in geojson properties

Jason Kent833957726feb
diff --git a/web/js/components/measure-tool/util.js b/web/js/components/measure-tool/util.js
index 236885d20..cd7942e1d 100644
--- a/web/js/components/measure-tool/util.js
+++ b/web/js/components/measure-tool/util.js
@@ -136,12 +136,17 @@ function getFeatureJSON(measurements, crs) {
const coordinates = type === 'Polygon'
? transformedGeom.getCoordinates()
: transformedGeom.getCoordinates()[0];
+
+ const [size, units] = overlay.element.innerText.split(' ');
+ const parsedSize = parseFloat(size.replace(/,/g, ''));
+
return {
type: 'Feature',
geometry: { type, coordinates },
properties: {
id: `${index}`,
- size: overlay.element.innerText,
+ size: parsedSize,
+ units,
},
};
}),