Closed npltr62 closed 2 years ago
Hello @npltr62 , as I know ZoomToExtent control doesn't allow change extent in runtime, because it can be configured only through control constructor. Seems that you need to make it yourself or extend their control with additional setter.
https://github.com/openlayers/openlayers/blob/v6.12.0/src/ol/control/ZoomToExtent.js#L28
How setting extent in ZoomtoExtent control dynamically?
let extent = this.$refs.vectorSource.$source.getExtent(); this.$refs.map.$map.getControls()