vue-gmaps

Vue.js plugin that allow search address and places using Google Maps API
12,991 115
Install
npm install vue-gmaps
Latest Version:0.2.2
License:GNU AGPLv3
Last Updated:Oct 9, 2023
Links: GitHub  ·  npm
Maintainer: ridermansb

Vue-Gmaps

Search address and places using Google Maps API

Travis bitHound semantic-release Commitizen friendly

NPM

Demo

Installation

npm i -S vue-gmaps

And in your main.js ...

// main.js
import VueGmaps from 'vue-gmaps'
Vue.use(VueGmaps, {
  key: '<your api here>'
})

Options are:

  • key <Required!>,
  • libraries <Default= [ 'places' ]>,
  • client
  • version <Default='3'>,
  • loadGoogleApi <Default=true>

libraries: ['places'], version: '3'****

Basic usage

Add the directive v-gmaps-searchbox into your input

<input v-model=vm.searchPlace v-gmaps-searchbox=vm>

This will popule your vm.place object with details about selected place.

Features

Specify property

By default, vm.place is used, you can change this passing an argument to directive e.g :anotherProperty

<input v-gmaps-searchbox:myProperty=vm>

So vm.myProperty will be filled with details about selected place

Specify whats fields

All information about place is put is filled, to determinate whats fields should be use, you can specify a modifiers like this .name.website.formatted_address.geometry

<input v-gmaps-searchbox:myProperty.name.website.formatted_address.geometry=vm>

So your vm will set property myProperty like this

{
    myProperty: {
        name: <value_from_result>,
        website: <value_from_result>,
        formatted_address: <value_from_result>,
        geometry: <value_from_result>,
    }
}

Click here to subscribe and get more about Vue.js

Related Packages

@vesperjs/vue

This is Vesper for Vue.js.

8,552 1
@wzpo/md-ui

Another Momentum UI framework for Vue.js applications

2,054
vue-google-maps-loader

A Vue 3 composable for loading the Google Maps JavaScript API with reactive loca...

2,430 0
vuenilla

Unstyled Vue.js component library.

1,552 2
vue-awesome

Font Awesome component for Vue.js, using inline SVG.

510,216 2,422

Version History

Version Released License
0.2.2 GNU AGPLv3
0.2.1 GNU AGPLv3
0.2.0 GNU AGPLv3
0.1.0 GNU AGPLv3
0.0.7 ISC