Answers for "_onResize vue leaflet"

0

_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>
Posted by: Guest on March-23-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language