import { LayerJSONType } from '../Layer';
import TileLayer, { TileLayerOptionsType, TilesType } from './TileLayer';
import Size from '../../geo/Size';
/**
* @classdesc
* A layer used to display a group of tile layers.
* Its performance is better than add TileLayers seperately and it can help prevent limits of active webgl contexts:
* "WARNING: Too many active WebGL contexts. Oldest context will be lost"
* @category layer
* @extends TileLayer
* @param {String|Number} id - tile layer's id
* @param {TileLayer[]} layers - TileLayers to add
* @param {Object} [options=null] - options defined in [TileLayer]{@link TileLayer#options}
* @example
* new GroupTileLayer("group-tiles",[
new maptalks.WMSTileLayer('wms', {
'urlTemplate' : 'https://demo.boundlessgeo.com/geoserver/ows',
'crs' : 'EPSG:3857',
'layers' : 'ne:ne',
'styles' : '',
'version' : '1.3.0',
'format': 'image/png',
'transparent' : true,
'uppercase' : true
}),
new maptalks.TileLayer('tile2',{
urlTemplate: 'http://korona.geog.uni-heidelberg.de/tiles/adminb/x={x}&y={y}&z={z}'
})
])
*/
declare class GroupTileLayer extends TileLayer {
layers: TileLayer[];
layerMap: Record;
/**
* Reproduce a GroupTileLayer from layer's profile JSON.
* @param layerJSON - layer's profile JSON
* @return
* @static
* @private
* @function
*/
static fromJSON(layerJSON: {
[x: string]: any;
}): GroupTileLayer;
/**
* @param id - layer's id
* @param layers - TileLayers to add
* @param [options=null] - construct options
* @param [options.*=null] - options defined in [TileLayer]{@link TileLayer#options}
*/
constructor(id: string, layers: TileLayer[], options?: GroupTileLayerOptionsType);
/**
* Get children TileLayer
*/
getLayers(): TileLayer[];
/**
* add tilelayers
* @param tileLayers
*/
addLayer(tileLayers?: TileLayer[]): this;
/**
* remove tilelayers
* @param tileLayers
*/
removeLayer(tileLayers?: TileLayer[]): this;
/**
* clear tilelayers
*/
clearLayers(): this;
/**
* Export the GroupTileLayer's profile json.
* Layer's profile is a snapshot of the layer in JSON format.
* It can be used to reproduce the instance by [fromJSON]{@link Layer#fromJSON} method
* @return layer's profile JSON
*/
toJSON(): LayerJSONType;
getTileSize(id: number | string): Size;
/**
* Get tiles at zoom (or current zoom)
* @param z
* @returns tiles
*/
getTiles(z: number, parentLayer: any): TilesType;
onAdd(): void;
onRemove(): void;
getLayer(id: string | number): TileLayer;
getChildLayer(id: string | number): TileLayer;
isVisible(): boolean;
}
export default GroupTileLayer;
export type GroupTileLayerOptionsType = TileLayerOptionsType & {
maxCacheSize?: number;
};
//# sourceMappingURL=GroupTileLayer.d.ts.map