I've encountered an issue with my map while working on a project using NuxtJS and the library . The map is not displaying correctly. Below is my code snippet and a screenshot of the problem:
map.vue :
<template>
<div id="map-wrap" style="height: 100vh">
<no-ssr>
<l-map :zoom="13" :center="[55.9464418, 8.1277591]">
<l-tile-layer
url="http://{s}.tile.osm.org/{z}/{x}/{y}.png"
></l-tile-layer>
<l-marker :lat-lng="[55.9464418, 8.1277591]"></l-marker>
</l-map>
</no-ssr>
</div>
</template>
nuxt-leaflet.js :
import Vue from 'vue';
import { LMap, LTileLayer, LMarker } from 'vue2-leaflet';
Vue.component('l-map', LMap);
Vue.component('l-tile-layer', LTileLayer);
Vue.component('l-marker', LMarker);
nuxt.config.js :
plugins: [
{
src: '~/plugins/nuxt-leaflet',
mode: 'client',
},
{
src: '~/plugins/vue-my-photos',
mode: 'client',
},
],
See the screenshot of the result here: https://i.sstatic.net/7kUhI.png