UNPKG

1.2 kBTypeScriptView Raw
1import { TileLayer } from 'leaflet';
2export declare class LeafletTileLayerDefinition {
3 type: string;
4 url: string;
5 options: any;
6 constructor(type: string, url: string, options: any);
7 /**
8 * Creates a TileLayer from the provided definition. This is a convenience function
9 * to help with generating layers from objects.
10 *
11 * @param layerDef The layer to create
12 * @returns {TileLayer} The TileLayer that has been created
13 */
14 static createTileLayer(layerDef: LeafletTileLayerDefinition): TileLayer;
15 /**
16 * Creates a TileLayer for each key in the incoming map. This is a convenience function
17 * for generating an associative array of layers from an associative array of objects
18 *
19 * @param layerDefs A map of key to tile layer definition
20 * @returns {{[p: string]: TileLayer}} A new map of key to TileLayer
21 */
22 static createTileLayers(layerDefs: {
23 [key: string]: LeafletTileLayerDefinition;
24 }): {
25 [key: string]: TileLayer;
26 };
27 /**
28 * Create a Tile Layer from the current state of this object
29 *
30 * @returns {TileLayer} A new TileLayer
31 */
32 createTileLayer(): TileLayer;
33}