vue2-mapboxgl-component
v0.2.0
Published
A Vue.js component for Mapbox GL
Downloads
7
Maintainers
Readme
NPM
npm install vue2-mapboxgl-component --save
<template>
<v-mapboxgl :access-token="accessToken"></v-mapboxgl>
</template>
<script>
import vMapboxgl from 'vue2-mapboxgl-component'
export default {
data () {
return {
accessToken: '<YOUR_ACCESS_TOKEN>'
}
},
components: {
vMapboxgl
}
}
</script>
Install dependencies, build the source files and preview
# Clone repo
git clone https://github.com/Naimikan/vue2-mapboxgl-component.git
# Install dependencies
npm install
# Serve with hot reload at localhost:8080
npm run dev
# Build for production with minification
npm run build
For detailed explanation on how things work, consult the docs for vue-loader.