Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/schlunsen/nuxt-leaflet
Nuxt module for leafletjs - https://schlunsen.github.io/nuxt-leaflet/
https://github.com/schlunsen/nuxt-leaflet
leafletjs nuxt
Last synced: 4 months ago
JSON representation
Nuxt module for leafletjs - https://schlunsen.github.io/nuxt-leaflet/
- Host: GitHub
- URL: https://github.com/schlunsen/nuxt-leaflet
- Owner: schlunsen
- License: mit
- Archived: true
- Created: 2018-03-13T09:01:03.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T01:53:45.000Z (about 2 years ago)
- Last Synced: 2024-10-09T22:11:25.625Z (4 months ago)
- Topics: leafletjs, nuxt
- Language: Vue
- Homepage:
- Size: 4.98 MB
- Stars: 200
- Watchers: 8
- Forks: 29
- Open Issues: 35
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# nuxt-leaflet
[](https://npmjs.com/package/nuxt-leaflet)
[](https://npmjs.com/package/nuxt-leaflet)
[](http://standardjs.com)> Nuxt module for leafletjs
[📖 **Release Notes**](./CHANGELOG.md)
## Features
Nuxt module for vue2-leaflet.
See [vue2-leaflet](https://github.com/KoRiGaN/Vue2Leaflet) for more details.
## Setup
- Add `nuxt-leaflet` dependency using yarn or npm to your project
- Add `nuxt-leaflet` to `modules` section of `nuxt.config.js````js
{
modules: [
// Simple usage
'nuxt-leaflet',// With options
['nuxt-leaflet', { /* module options */ }],
]
}
```## Usage
Add the map to your page
``` html
```The Leaflet 'L' object can be found on vue component: ```this.$L```
## Typescript
If you're using TypeScript, you'll need to add nuxt-leaflet in your compilerOptions of your tsconfig.json :
```json
{
"compilerOptions": {
"types": [
"@types/node",
"@nuxt/vue-app",
"nuxt-leaflet"
]
}
}
```You'll then be able to have autocompletion in Vue instances (```this.$L```).
## List of currently implemented components
See [components](https://github.com/schlunsen/nuxt-leaflet/blob/master/lib/templates/plugin.js) supported
## Development
- Clone this repository
- Install dependencies using `yarn install` or `npm install`
- Start development server using `npm run dev`## License
[MIT License](./LICENSE)
Copyright (c) Rasmus Schlunsen