whatsmode-nuxt-google-maps-module

1.0.2 • Public • Published

Nuxt Google Maps Module

npm (scoped with tag) npm js-airbnb-style

A NuxtJS module to import Google maps script

Table of Contents

Requirements

  • npm
  • NuxtJS
  • NodeJS

Install

$ npm install --save nuxt-google-maps-module

Getting Started

Add nuxt-google-maps-module to modules section of nuxt.config.js.

{
  modules: [
    // Simple usage
    'nuxt-google-maps-module',

    // With options
    ['nuxt-google-maps-module', {
      /* module options */
      key: 'GOOGLE MAPS KEY', // Default
    }],
 ]
}

or even

{
  modules: [
    'nuxt-google-maps-module',
  ],
  maps: {
    key: 'GOOGLE MAPS KEY',
  },
}

Usage

Once configured in nuxt.config.js, you can use it in your components like:

{
  ...
  mounted() {
    const autocomplete = new this.$google.maps.places.Autocomplete(inputElement,
      {
        types: ['geocode'],
      },
    );
  },
  ...
}

License

MIT License

Readme

Keywords

none

Package Sidebar

Install

npm i whatsmode-nuxt-google-maps-module

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

6.47 kB

Total Files

8

Last publish

Collaborators

  • mifind