_onResize vue leaflet code example
Example: _onResize vue leaflet
<template>
<b-container>
<b-button v-b-toggle="collapse" variant="primary">Show map</b-button>
<b-collapse @shown="reloadMap()" id="collapse">
<div id="map">
<LMap ref="map" ...>
...
</LMap>
</div>
</b-collapse>
</b-container>
</template>
<script>
...
export default {
...
methods: {
reloadMap: function () {
this.$refs.map.mapObject.invalidateSize()
}
}
}
</script>