We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c33ef44 commit 4125541Copy full SHA for 4125541
src/components/sources/OlSourceVector.vue
@@ -67,6 +67,34 @@ const applySource = () => {
67
layer?.value.setSource(source.value);
68
}
69
};
70
+
71
+watch(
72
+ () => properties.features,
73
+ (updatedFeatures, oldFeatures) => {
74
+ if (updatedFeatures !== oldFeatures) {
75
+ source.value.clear();
76
+ if (updatedFeatures) {
77
+ source.value.addFeatures(updatedFeatures);
78
+ }
79
80
+ applySource();
81
+ },
82
+ { deep: true },
83
+);
84
85
86
+ () => properties.url,
87
+ (updatedUrl, newUrl) => {
88
+ if (updatedUrl !== newUrl) {
89
90
+ if (updatedUrl) {
91
+ source.value.setUrl(updatedUrl);
92
93
94
95
96
97
98
watch(
99
() => properties,
100
() => applySource(),
0 commit comments