Compare commits
No commits in common. "6367d3399d15d9410db24f2a3b91576fba7e6894" and "ad86e41345f138c6404643e5f5aebca60e542771" have entirely different histories.
6367d3399d
...
ad86e41345
@ -11,7 +11,7 @@ import * as proj from 'ol/proj';
|
|||||||
import * as loadingstrategy from 'ol/loadingstrategy';
|
import * as loadingstrategy from 'ol/loadingstrategy';
|
||||||
import * as style from 'ol/style';
|
import * as style from 'ol/style';
|
||||||
import {Tile,Layer,Image} from 'ol/layer';
|
import {Tile,Layer,Image} from 'ol/layer';
|
||||||
import {XYZ,ImageStatic,OSM,BingMaps,TileWMS,TileArcGISRest,TileJSON} from 'ol/source';
|
import {XYZ,ImageStatic,OSM,BingMaps,TileWMS,TileArcGISRest} from 'ol/source';
|
||||||
import {Vector as VectorSource} from 'ol/source';
|
import {Vector as VectorSource} from 'ol/source';
|
||||||
import { Vector as VectorLayer } from 'ol/layer';
|
import { Vector as VectorLayer } from 'ol/layer';
|
||||||
import VectorTileSource from 'ol/source/VectorTile';
|
import VectorTileSource from 'ol/source/VectorTile';
|
||||||
@ -212,11 +212,6 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
layer = new Tile({ source: source });
|
layer = new Tile({ source: source });
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'TileJSON': {
|
|
||||||
let source = new TileJSON(data.options);
|
|
||||||
layer = new Tile({ source: source });
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'TileArcGISRest': {
|
case 'TileArcGISRest': {
|
||||||
let source = new TileArcGISRest(data.options);
|
let source = new TileArcGISRest(data.options);
|
||||||
layer = new Tile({ source: source });
|
layer = new Tile({ source: source });
|
||||||
|
@ -407,13 +407,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);
|
||||||
let sb = baseLayers.filter(layer => layer.item.code === mapState.baseLayerCode);
|
let sb = baseLayers.filter(layer => layer.item.code === mapState.baseLayerCode)[0];
|
||||||
let db = baseLayers.filter(layer => layer.item.data && layer.item.data.default === true);
|
if (baseLayers.length > 0 && mapState.baseLayerCode != "" && sb) {
|
||||||
if (baseLayers.length > 0 && mapState.baseLayerCode != "" && sb.length>0) {
|
selectedBaseLayer = sb;
|
||||||
selectedBaseLayer = sb[0];
|
|
||||||
selectedBaseLayer.visible = true;
|
|
||||||
} else if (baseLayers.length >0 && db.length>0){
|
|
||||||
selectedBaseLayer = db[0];
|
|
||||||
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