-
Notifications
You must be signed in to change notification settings - Fork 376
Closed
Labels
Description
Description
Steps to Reproduce
- installed Vue2Leaflet via npm
- created a component called
Simple
with the following contents (just copied the Simple.vue example and added the style import)
<template>
<div class="simple">
<div id="top_div" style="height: 100%">
<v-map :zoom="zoom" :center="center" style="height: 1000px; width: 1000px">
<v-tilelayer :url="url" :attribution="attribution"></v-tilelayer>
<v-marker :lat-lng="marker"></v-marker>
</v-map>
</div>
</div>
</template>
<script>
import Vue2Leaflet from 'vue2-leaflet';
export default {
name: 'simple',
components: {
'v-map': Vue2Leaflet.Map,
'v-tilelayer' :Vue2Leaflet.TileLayer,
'v-marker': Vue2Leaflet.Marker
},
data () {
return {
zoom: 13,
center: [47.413220, -1.219482],
url: 'http://{s}.tile.osm.org/{z}/{x}/{y}.png',
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
marker: L.latLng(47.413220, -1.219482),
}
}
}
</script>
<style>
@import "~leaflet/dist/leaflet.css";
</style>
Expected Results
I expect to see the basic map with marker from the example jsfiddle.
Actual Results
The map appears as a large gray box with a small section with rendered map tiles. My problem looks identical to the one described in #81 , but I do include the leaflet css import.
What is strange is that when I resize the window, the map loads as it should, but the marker does not show up. I see in the html that the marker is loaded, however:
Browsers Affected
- [x ] Chrome
- [x ] Firefox
- Edge
- Safari 9
- Safari 8
- IE 11
Versions
- Leaflet: v1.2.0
- Vue: v2.5.2
- Vue2Leaflet: v0.0.55
mohammad7t, kfkhalili, WinTven, gavinr, rbs90 and 20 more