Socket
Socket
Sign inDemoInstall

vue-gmaps

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-gmaps

Vue.js plugin that allow search address and places using Google Maps API


Version published
Weekly downloads
291
decreased by-15.41%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 02 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc