// background layer
// ----------------
- // OSM map
- let layer_map = new ol.layer.Tile({
+ let layer_map;
+
+ // OSM layer
+ layer_map = new ol.layer.Tile({
source: new ol.source.OSM()
});
+ // basemap.at layer // TODO: Currently this is a race condition
+ let capabilitiesUrl = 'https://www.basemap.at/wmts/1.0.0/WMTSCapabilities.xml';
+ fetch(capabilitiesUrl).then(function(response) {
+ return response.text();
+ }).then(function(text) {
+ let result = new ol.format.WMTSCapabilities().read(text);
+ let options = ol.source.WMTS.optionsFromCapabilities(result, {
+ layer: 'geolandbasemap',
+ matrixSet: 'google3857',
+ style: 'normal',
+ });
+ layer_map = new ol.layer.Tile({
+ source: new ol.source.WMTS(options),
+ });
+ });
/*
// Microsoft Bing Maps
// tileOptions: {crossOriginKeyword: null}});
// // Alternative: Base map
- // // see: http://www.basemap.at
+ // // see: https://www.basemap.at
// // Alternative: OpenTopoMap
// // see: https://opentopomap.org/about