I have an leaflet map like this (snipped):
<template>
<client-only>
<div>
<l-map
ref="myMap"
:zoom="zoom"
:max-zoom="maxZoom"
:min-zoom="minZoom"
:crs="crs"
:options="mapOptions"
Im trying to access my created map object of a leaflet map during mounted hook like this:
mounted() {
this.maxZoom = this.$refs.myMap.mapObject.getMaxZoom()
or
this.$L.myMap.mapObject.getMaxZoom()
but i alwayways get a "... is undefine" error. What am i doing wrong here and how can i access my map object to get some stuff like .getMaxZoom() during runtime using nuxt-leaflet? Without nuxt-leaflet, only using vue2leaflet it works like a charm...