i am trying to add a couple of layers to my map, but these layers must be empty. I mean when i activate this layer it must return an alert or something similar saying "Coming soon".
map = new ol.Map({
layers: [
new ol.layer.Group({
'title': 'Mapas de base',
layers: [grisOSM, mapaOSM]
}),
/* new ol.layer.Group({
title: 'Capas de información',
layers: [ ]
}) */
],
target: 'map',
controls: ol.control.defaults({
zoom: true,
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
collapsible: false
})
}).extend([
scaleLineControl
]),
view: vista,
interactions: new ol.interaction.defaults({
altShiftDragRotate: false
}),
});
const layerSwitcher = new ol.control.LayerSwitcher({
tipLabel: 'Leyenda'
});
map.addControl(layerSwitcher);
This is my layerSwitcher where i want to add these layers:
An empty vector layer will show in a layer switcher and can also be used display attributions
new ol.layer.Vector({
title: 'Empty layer',
source: new ol.source.Vector({
attributions: '© No data'
})
})