Closed
Description
Describe the bug
I'm using "ol-source-vector" in my project with a URL parameter that can be changed when the user interacts with the interface. This is needed to implement switching floors on the building map.
I set url option that way:
const params = computed(() => ({
service: 'WFS',
version: '1.0.0',
request: 'GetFeature',
outputFormat: 'application/json',
typeName: 'smvu2:DPbyUUID',
VIEWPARAMS: `floor_n:${activeFloor.value};uuid:${props.uuid}`,
}));
const url = computed(() => `/geoserver/smvu2/ows?${new URLSearchParams(params.value).toString()}`);
And everything worked well on version 4.1.0. The user clicked the floor buttons and the map reloaded instantly.
Code for map:
<ol-vector-image-layer :zIndex="0">
<ol-source-vector ref="vectorSource" :url="url" :format="geoJson" />
</ol-vector-image-layer>
But now this feature broken. Map doesn't trigger fetch request after url option changed.
Affected version(s)
Tested on vue3-openlayers 8.1.0 and 10.0.0
"ol": "^9.1.0"
"ol-contextmenu": "^5.4.0"
"ol-ext": "^4.0.18"
To Reproduce
Steps to reproduce the behavior:
- Create ol source vector component with url option
- Change url ref/computed
- See that map not realoading and request not sent
Expected behavior
Map send request to url provided
Desktop (please complete the following information):
- OS: Windows
- Browser: Chrome