Comments (1)
+1, some kind of unit tests would be needed. In addition to that, the <client-only>
breaks all unit tests, and it's not possible to register the component, as the other ones in unit tests, such as l-map
, via Vue.component("l-map", LMap);
etc.
In addition to that,
created(): void {
this.$nextTick(() => {
this.myMap = this.$refs.map.mapObject; // "this.$refs.map.mapObject" is a Leaflet object. Read more: https://vue2-
leaflet.netlify.app/faq/#how-can-i-access-the-leaflet-map-object
this.myMap.setView([lat, lng], 12);
...
}
}
breaks unit tests with the error console.error TypeError: Cannot read property 'setView' of undefined
Last, but not least, might be related to this. All the time after implementing nuxt-leaflet
, I can see in my terminal [Vue warn]: Error in nextTick: "TypeError: Cannot read property 'mapObject' of undefined"
while running the app locally npm run dev
.
from nuxt-leaflet.
Related Issues (20)
- How to add googlemutant layer into it
- L-control is missing. HOT 1
- Typo in plugin.js
- multipolygon
- Update npm-publish-git-tag to @hutson/npm-deploy-git-tag
- Nuxt 3? HOT 2
- How to change icons in Nuxt with Composition API
- this.$L not available in composition API HOT 1
- How to change CRS?
- Window is not defined. When ssr: set to true in nuxt.config
- Adding a map marker dynamically HOT 2
- Window not defined: SSR error with custom marker HOT 1
- Bump the version dependency of vue2-leaflet HOT 2
- Changing Styles - Implementing custom styling HOT 2
- Can we have an example please? HOT 2
- How to implement custom options? HOT 1
- How to load `nuxt-leaflet` locally? HOT 5
- Changing options does not automatically reload
- Removing attribution HOT 1
- Styles fail to load in combination with PurgeCSS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuxt-leaflet.