https://github.com/magicdawn/vue-mgl
mapbox-gl vue components (map, layers, sources, controls). docs see:
https://github.com/magicdawn/vue-mgl
Last synced: 11 months ago
JSON representation
mapbox-gl vue components (map, layers, sources, controls). docs see:
- Host: GitHub
- URL: https://github.com/magicdawn/vue-mgl
- Owner: magicdawn
- License: mit
- Created: 2019-12-04T11:57:51.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-16T12:05:09.000Z (over 6 years ago)
- Last Synced: 2025-06-09T13:09:49.973Z (about 1 year ago)
- Language: JavaScript
- Homepage: https://vue-mgl.netlify.com/
- Size: 97.7 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# vue-mgl
> mapbox-gl vue components (map, layers, sources, controls)
[](https://travis-ci.org/magicdawn/vue-mgl)
[](https://codecov.io/gh/magicdawn/vue-mgl)
[](https://www.npmjs.com/package/vue-mgl)
[](https://www.npmjs.com/package/vue-mgl)
[](http://magicdawn.mit-license.org)
## Install
```sh
$ npm i vue-mgl --save
```
### builds
| file | field | desc | externals |
| -------------------------- | ---------------- | ------------------------------------- | ---------------------------- |
| `dist/vue-mgl.esm.js` | `package.module` | es module build | external all dependencies |
| `dist/vue-mgl.common.js` | `package.main` | commonjs build | external all dependencies |
| `dist/vue-mgl-full.umd.js` | `package.umd` | browser build, for `` use | external `mapbox-gl` & `vue` |
## API
### use global `mgl-*` component
```js
import VueMgl from 'vue-mgl'
import Vue from 'vue'
Vue.use(VueMgl) // this will add MglMap ... global components
```
### manual import
```js
import { MglMap, MglSource, MglLayer } from 'vue-mgl'
export default {
// ...
components: { MglMap, MglSource, MglLayer },
// ...
}
```
## Changelog
[CHANGELOG.md](CHANGELOG.md)
## License
the MIT License http://magicdawn.mit-license.org