@lassehaslev/vue-google-map

Google map for use with vue

Usage no npm install needed!

<script type="module">
  import lassehaslevVueGoogleMap from 'https://cdn.skypack.dev/@lassehaslev/vue-google-map';
</script>

README

@lassehaslev/vue-google-map

Google map for use with vue

Install

Run npm install @lassehaslev/vue-google-map --save in your project folder.

Usage

<template>
    <div style="height 300px">
        <google-map @ready="mapReady" :lat="59.9139" :lng="10.7522"></google-map>
    </div>
</template>
<script>
import GoogleMap from '@lassehaslev/vue-google-map';
export default {
    name: 'app',

    methods: {
        mapReady( map, google ) {
            new google.maps.Map(...);
        }
    },

    components: {
        GoogleMap,
    }
}
</script>

Build Setup

# 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.