'Leaflet 1.8 and Vue map initialization fails
Since updating to Leaflet 1.8 my small leaflet component is no longer working, because the map is not initializing.
So the the small vue app starts like this:
if (document.getElementById("myapp")) {
var App = window.App = new Vue({
el: '#myapp',
data: {
currentStep: 0,
...
The leaflet map was always inside the app like this:
<div id="myapp">
<div id="map_canvas"></div>
</div>
The leaflet initialization is very trivial.
It worked befor switching to Leaflet 1.8. It works with 1.8 when taking the leaflet container out of the vue app scope like this:
But before switching to leaflet 1.8 initialization also worked inside the app.
I read the changelog here: https://github.com/Leaflet/Leaflet/releases/tag/v1.8.0 Is there some kind of collision going on?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
