Interactive interface for browsing global, full-resolution satellite imagery
remove TODOs and cleanup unused props
Jason Kentaa973478e85a
diff --git a/web/js/components/map/ol-measure-tool.js b/web/js/components/map/ol-measure-tool.jsindex d2911314c..11205e2ba 100644--- a/web/js/components/map/ol-measure-tool.js+++ b/web/js/components/map/ol-measure-tool.js@@ -58,11 +58,11 @@ function OlMeasureTool (props) {let twoFingerTouchListener;const {- map, olMap, crs, bbox, unitOfMeasure, toggleMeasureActive, updateMeasurements,+ map, olMap, crs, unitOfMeasure, toggleMeasureActive, updateMeasurements,} = props;- const dlShapeFiles = () => downloadShapefiles(allMeasurements[crs], bbox);- const dlGeoJSON = () => downloadGeoJSON(allMeasurements[crs], bbox);+ const dlShapeFiles = () => downloadShapefiles(allMeasurements[crs]);+ const dlGeoJSON = () => downloadGeoJSON(allMeasurements[crs]);useEffect(() => {if (map && map.rendered) {@@ -315,12 +315,11 @@ const mapStateToProps = (state) => {measure,} = state;const { unitOfMeasure } = measure;- const { crs, maxExtent } = proj.selected;+ const { crs } = proj.selected;return {map,olMap: map.ui.selected,crs,- bbox: maxExtent,unitOfMeasure,};};diff --git a/web/js/components/measure-tool/util.js b/web/js/components/measure-tool/util.jsindex 013605023..627025497 100644--- a/web/js/components/measure-tool/util.js+++ b/web/js/components/measure-tool/util.js@@ -124,8 +124,7 @@ export function getGeographicLibDistance(line) {return totalDistance;}-// TODO - area measurments as geoJSON don't work-function getFeatureJSON(measurements, bbox) {+function getFeatureJSON(measurements) {return {type: 'FeatureCollection',features: Object.values(measurements).map(({ feature, overlay }) => {@@ -142,7 +141,7 @@ function getFeatureJSON(measurements, bbox) {};}-export function downloadShapefiles(measurements, bbox) {+export function downloadShapefiles(measurements) {// Set names for feature types and zipped folderconst options = {folder: 'worldviewMeasurements',@@ -151,11 +150,11 @@ export function downloadShapefiles(measurements, bbox) {polyline: 'distanceMeasurements',},};- shpWrite.download(getFeatureJSON(measurements, bbox), options);+ shpWrite.download(getFeatureJSON(measurements), options);}-export function downloadGeoJSON(measurements, bbox) {- const data = JSON.stringify(getFeatureJSON(measurements, bbox), undefined, 2);+export function downloadGeoJSON(measurements) {+ const data = JSON.stringify(getFeatureJSON(measurements), undefined, 2);const fileName = 'worldviewMeasurements.json';const fileType = 'application/geo+json';const blob = new Blob([data], { fileType, fileName });