Nuxt module for leafletjs
Nuxt module for vue2-leaflet.
See vue2-leaflet for more details.
- Add
nuxt-leaflet
dependency using yarn or npm to your project - Add
nuxt-leaflet
tomodules
section ofnuxt.config.js
{
modules: [
// Simple usage
'nuxt-leaflet',
// With options
['nuxt-leaflet', { /* module options */ }],
]
}
Add the map to your page
<div id="map-wrap" style="height: 100%">
<no-ssr>
<l-map :zoom=13 :center="[47.413220, -1.219482]">
<l-tile-layer url="http://{s}.tile.osm.org/{z}/{x}/{y}.png"></l-tile-layer>
<l-marker :lat-lng="[47.413220, -1.219482]"></l-marker>
</l-map>
</no-ssr>
</div>
See components supported
- Clone this repository
- Install dependnecies using
yarn install
ornpm install
- Start development server using
npm run dev
Copyright (c) Rasmus Schlunsen