Closed TitanFighter closed 4 years ago
Hello @TitanFighter , this is true, in the mounted hook internal ol.Map instance can be not yet initialized.
So you should use:
this.$refs.map.$createPromise.then(() => this.$refs.map.refresh())
or created
or mounted
event hook.<vl-map
ref="map"
:load-tiles-while-animating="true"
:load-tiles-while-interacting="true"
data-projection="EPSG:4326"
style="height: 400px"
@created="vm => vm.refresh()"
>
...
</vl-map>
According to the issue [Vuelayers map not showing in tab vue](this.$refs.map.updateSize()) I need to execute
this.$refs.map.refresh()
but it throwsAssertionError: component has "$map" property
.Here is the code:
Trace:
What do I do wrong?