Fix base map not showing
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
parent
f4d1a04303
commit
51bb5b3833
@ -11,7 +11,7 @@
|
|||||||
"@ngrx/router-store": "^9.0",
|
"@ngrx/router-store": "^9.0",
|
||||||
"@ngrx/store": "^9.0",
|
"@ngrx/store": "^9.0",
|
||||||
"tassign": "^1.0.0",
|
"tassign": "^1.0.0",
|
||||||
"@farmmaps/common": ">=0.0.1-prerelease.181 <0.0.1",
|
"@farmmaps/common": ">=0.0.1-prerelease.265 <0.0.1",
|
||||||
"ngx-openlayers": "1.0.0-next.13",
|
"ngx-openlayers": "1.0.0-next.13",
|
||||||
"ol": "6.1.1"
|
"ol": "6.1.1"
|
||||||
}
|
}
|
||||||
|
@ -401,9 +401,9 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
|
|||||||
}
|
}
|
||||||
var selectedBaseLayer: IItemLayer = null;
|
var selectedBaseLayer: IItemLayer = null;
|
||||||
var mapState = tassign(state.mapState);
|
var mapState = tassign(state.mapState);
|
||||||
console.debug(`Base layerload: ${mapState.baseLayerCode}`)
|
let sb = baseLayers.filter(layer => layer.item.code === mapState.baseLayerCode)[0];
|
||||||
if (baseLayers.length > 0 && mapState.baseLayerCode != "") {
|
if (baseLayers.length > 0 && mapState.baseLayerCode != "" && sb) {
|
||||||
selectedBaseLayer = baseLayers.filter(layer => layer.item.code === mapState.baseLayerCode)[0];
|
selectedBaseLayer = sb;
|
||||||
selectedBaseLayer.visible = true;
|
selectedBaseLayer.visible = true;
|
||||||
} else if (baseLayers.length > 0) {
|
} else if (baseLayers.length > 0) {
|
||||||
selectedBaseLayer = baseLayers[0];
|
selectedBaseLayer = baseLayers[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user