Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Add rotation param #1576

Benjamin Kingae62f70a5525
diff --git a/web/js/modules/map/util.js b/web/js/modules/map/util.js
index de2838e73..59350f4d3 100644
--- a/web/js/modules/map/util.js
+++ b/web/js/modules/map/util.js
@@ -25,6 +25,20 @@ export function getMapParameterSetup(
return encode(models.map.extent || leadingExtent);
}
}
+ },
+ r: {
+ stateKey: 'legacy.map.rotation',
+ initialState: 0,
+ options: {
+ parse: () => {
+ return loadedModel.rotation || 0;
+ },
+ serialize: (currentItemState, currentState) => {
+ return models.map.rotation
+ ? (models.map.rotation * (180.0 / Math.PI)).toPrecision(6)
+ : undefined;
+ }
+ }
}
};
}
diff --git a/web/js/modules/migration/reducers.js b/web/js/modules/migration/reducers.js
index 6cd494694..728871ac3 100644
--- a/web/js/modules/migration/reducers.js
+++ b/web/js/modules/migration/reducers.js
@@ -19,7 +19,7 @@ const legacyState = {
active: [],
activeB: []
},
- map: { selectedMap: null },
+ map: { selectedMap: null, rotation: 0 },
initComplete: false
};