Closed logue closed 3 years ago
Hello @logue , try this one:
watch: {
category() {
// Reflesh Layer
this.$refs.overlayMapSource.$createPromise.then(() => {
const source = this.$refs. overlayMapSource.$source;
source.tileCache.expireCache({});
source.tileCache.clear();
source.refresh();
});
},
},
I managed to implement it myself, but an error occurred, so I tried to cheat with try ~ catch.
The point is to use $createPromise
.
Thanks.
it has no good way ?
it has no good way ?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I am trying to write a process to dynamically rewrite the url value of v-source-xyz according to the value of this.$route.params.category and overlay another map, but it does not work.
The map image before the change is displayed, or the map image of the layer read before that is displayed in the foreground.
Is there a good way to swap the image of the overlay layer?
Refer to https://gis.stackexchange.com/questions/91226/force-reload-of-tiles-in-layer and refreshing the tile cache when the category variable changes as below does not work either. was.