nuxt-modules / leaflet

A Nuxt module to use Leaflet
https://leaflet.nuxtjs.org/
Apache License 2.0
108 stars 3 forks source link

Error in documentation. leafletObject -> mapObject #74

Closed e6voe9 closed 2 weeks ago

e6voe9 commented 2 weeks ago

https://leaflet.nuxtjs.org/guide/accessing-map-instance.html

LMap component.

It says that there is a way to access leafleft instance via leafletObject

const onMapReady = () => {
    // Access the Leaflet map instance
    console.log(map.value.leafletObject)
}

In reality property called mapObject

image image
Gugustinette commented 2 weeks ago

Where does this come from ?

In the vue-leaflet source code, it is exposed via leafletObject : code and documentation

e6voe9 commented 2 weeks ago

I'm using 0.0.27 of nuxt-leaflet. It has "vue2-leaflet": "^2.7.1" as a dependency.

Gugustinette commented 2 weeks ago

Oh you're on the wrong module lol, this one is @nuxtjs/leaflet and should have @vue-leaflet/vue-leaflet in dependency.

This is probably the module you're using : https://github.com/schlunsen/nuxt-leaflet

e6voe9 commented 2 weeks ago

wrong module it is

Gugustinette commented 2 weeks ago

If you want to use the Nuxt 3 module, you'll need to make sure to delete everything related to the deprecated nuxt-leaflet and follow the instructions.

Can I close this issue now ?

e6voe9 commented 2 weeks ago

Yes, feel free to close it.

Thank you