// WMTS layer to be used for testingconst wmtsLayer: IWmtsLayer = {
id: '102',
url: 'https://lbsva.telcel.com/tiles/gwc/service/wmts?layer=telcel:cincog_no_garantizada&style=&tilematrixset=EPSG:900913&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&TileMatrix=EPSG:900913:{z}&TileCol={x}&TileRow={y}'
};
// Creates a WMTS layer collectionconst wmtsLayerCollection: WmtsLayerCollection = new WmtsLayerCollection();
// Adds a WMTS Layer to the collection.
wmtsLayerCollection.addWmtsLayer(wmtsLayer);
// Sets the visibility of a WMTS layer from the collection.// This method is optimal for scenarios where you set and unset over and over the same WMTS layer.
wmtsLayerCollection.removeById('102', true);
// Removes a WMTS layer from the collection
wmtsLayerCollection.removeById('102');
Class containing several Wmts layers. Basic methods for adding and deleting them.
Url should be formatted with {x}, {y} and {z}:
How to use the WMTS layer interfaces and clases.
// WMTS layer to be used for testing const wmtsLayer: IWmtsLayer = { id: '102', url: 'https://lbsva.telcel.com/tiles/gwc/service/wmts?layer=telcel:cincog_no_garantizada&style=&tilematrixset=EPSG:900913&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&TileMatrix=EPSG:900913:{z}&TileCol={x}&TileRow={y}' }; // Creates a WMTS layer collection const wmtsLayerCollection: WmtsLayerCollection = new WmtsLayerCollection(); // Adds a WMTS Layer to the collection. wmtsLayerCollection.addWmtsLayer(wmtsLayer); // Sets the visibility of a WMTS layer from the collection. // This method is optimal for scenarios where you set and unset over and over the same WMTS layer. wmtsLayerCollection.removeById('102', true); // Removes a WMTS layer from the collection wmtsLayerCollection.removeById('102');