How to use the fitBounds() function with a padding option?
I tried this.$refs.leafmap.fitBounds(this.initbounds,{ padding: [20, 20] })
but it isn鈥檛 working that way.
I tried to set a :padding on the LMap component too. But it seems the map doesn't recognize the value. I tried this with number arrays like [50,50] or [50,50,50,50]
Thanks!
solved it by using the mapObject function.
this.$refs.leafmap.mapObject.fitBounds(this.initbounds, { padding: [30, 30] });
Most helpful comment
solved it by using the mapObject function.
this.$refs.leafmap.mapObject.fitBounds(this.initbounds, { padding: [30, 30] });