Implement min/maxzoom on vectorlayer
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
c44c771feb
commit
9e4a538a07
@ -120,7 +120,7 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
||||
var layer: Layer = null;
|
||||
layerIndex = itemLayer.layerIndex != -1 ? itemLayer.layerIndex : item.data.layers[0].index;
|
||||
var data = item.data;
|
||||
var l = (data && data.layers && data.layers.length > 0) ? data.layers[layerIndex] : null;
|
||||
var l:ILayer = (data && data.layers && data.layers.length > 0) ? data.layers[layerIndex] : null;
|
||||
if (l && l.rendering && l.rendering.renderoutputType == "VectorTiles") {
|
||||
var rt = l.rendering as IRenderoutputTiles;
|
||||
layer = new VectorTileLayer({
|
||||
@ -194,6 +194,12 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
||||
}
|
||||
});
|
||||
}
|
||||
if(l.minzoom) {
|
||||
layer.setMinZoom(l.minzoom);
|
||||
}
|
||||
if(l.maxzoom) {
|
||||
layer.setMaxZoom(l.maxzoom);
|
||||
}
|
||||
return layer;
|
||||
}
|
||||
|
||||
|
@ -88,5 +88,7 @@ export interface IRenderoutputImage {
|
||||
|
||||
export interface ILayer extends IDataLayer {
|
||||
renderer: IRenderer,
|
||||
rendering: IRenderoutput
|
||||
rendering: IRenderoutput,
|
||||
minzoom: number,
|
||||
maxzoom: number
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user