I am in the process of creating a web mapping application using the Vue Layers library, which is described as "Web map Vue components with the power of OpenLayers".
Within my template, I have the following code:
<vl-map @singleclick="hideOverlay" @postcompose="onMapPostCompose"
:load-tiles-while-animating="true" ref="map"
:load-tiles-while-interacting="true" data-projection="EPSG:4326"
style="height: 900px" @mounted="onMapMounted">
....
<component v-for="layer in layers" :ref="layer.id" overlay
:is="layer.cmp"
:key="layer.id" v-bind="layer">
<component :is="layer.source.cmp" v-if="layer.visible" v-bind="layer.source">
</component>
</component>
....
</vl-map>
In the data object, there is a property called "layers" defined in this way:
layers: [
{
id: 'sections',
title: 'Sections',
cmp: 'vl-layer-tile',
visible: true,
source: {
cmp: 'vl-source-wms',
url: 'http://localhost:8080/geoserver/sager/wms',
layers: 'sections',
tiled: true,
format: 'image/png',
serverType: 'geoserver',
},
},
....
]
My question now is, how can I access the layer properties when it is clicked? It seems that the vl-tile-layer component does not have a click event like mentioned here.