vue2-leaflet

import L from 'leaflet'

import 'leaflet/dist/leaflet.css'

L.Icon.Default.imagePath = '/'

L.Icon.Default.mergeOptions({

  iconRetinaUrl: require('leaflet/dist/images/marker-icon-2x.png'),

  iconUrl: require('leaflet/dist/images/marker-icon.png'),

  shadowUrl: require('leaflet/dist/images/marker-shadow.png')

})

最外层容器需要设置高度

你可能感兴趣的:(vue2-leaflet)