@geogirafe/lib-geoportal
Version:
GeoGirafe is a flexible application to build online geoportals.
24 lines (23 loc) • 1.02 kB
JavaScript
// SPDX-License-Identifier: Apache-2.0
import LayerConsts from '../layers/layerconsts.js';
import LayerVectorTiles from '../layers/layervectortiles.js';
import Basemap from './basemap.js';
export default class BasemapSwisstopoVectorTiles extends Basemap {
constructor() {
const basemapMetadata = {
isLegendExpanded: false,
wasLegendExpanded: false,
exclusiveGroup: false,
isExpanded: false,
isChecked: false,
thumbnail: 'images/basemap_vectortiles.webp'
};
super({
id: LayerConsts.LayerSwisstopoVectorTilesId,
name: 'Swisstopo Vector-Tiles',
metadata: { ...basemapMetadata }
});
const vectorTilesLayer = new LayerVectorTiles(LayerConsts.LayerSwisstopoVectorTilesId, 'Swisstopo Vector-Tiles', 0, 'https://vectortiles.geo.admin.ch/styles/ch.swisstopo.lightbasemap.vt/style.json', { projection: 'EPSG:3857' });
this.layersList.push(vectorTilesLayer);
}
}