diff --git a/projects/common-map/src/fm-map/components/aol/item-layers/item-layers.component.ts b/projects/common-map/src/fm-map/components/aol/item-layers/item-layers.component.ts index 0357536..29266b1 100644 --- a/projects/common-map/src/fm-map/components/aol/item-layers/item-layers.component.ts +++ b/projects/common-map/src/fm-map/components/aol/item-layers/item-layers.component.ts @@ -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; } diff --git a/projects/common-map/src/fm-map/models/color.map.ts b/projects/common-map/src/fm-map/models/color.map.ts index b7b610e..6896fbe 100644 --- a/projects/common-map/src/fm-map/models/color.map.ts +++ b/projects/common-map/src/fm-map/models/color.map.ts @@ -88,5 +88,7 @@ export interface IRenderoutputImage { export interface ILayer extends IDataLayer { renderer: IRenderer, - rendering: IRenderoutput + rendering: IRenderoutput, + minzoom: number, + maxzoom: number }