Store mapstate in localstorage
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good

This commit is contained in:
Willem Dantuma
2020-01-06 18:36:47 +01:00
parent 50d1d9645a
commit 58f7c99ddc
2 changed files with 23 additions and 2 deletions

View File

@@ -175,6 +175,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
newMapState = { xCenter: xCenter, yCenter: yCenter, zoom: zoom, rotation: rotation, baseLayerCode: baseLayer }
mapStateChanged = this.lastMapState != JSON.stringify(newMapState) && this.stateSetCount == 0;
this.lastMapState = JSON.stringify(newMapState);
window.localStorage.setItem("FarmMapsCommonMap_mapState",this.lastMapState);
}
if (params.has("queryState")) {
let queryState = params.get("queryState");