https://github.com/williamdasilva/nuxt-google-maps-module
Inject Google Maps script
https://github.com/williamdasilva/nuxt-google-maps-module
google maps nuxt-module nuxtjs
Last synced: 4 months ago
JSON representation
Inject Google Maps script
- Host: GitHub
- URL: https://github.com/williamdasilva/nuxt-google-maps-module
- Owner: WilliamDASILVA
- License: mit
- Created: 2018-01-02T09:29:51.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-08-22T03:41:51.000Z (10 months ago)
- Last Synced: 2025-11-16T05:03:20.690Z (7 months ago)
- Topics: google, maps, nuxt-module, nuxtjs
- Language: JavaScript
- Homepage:
- Size: 812 KB
- Stars: 22
- Watchers: 1
- Forks: 8
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Nuxt Google Maps Module
[](https://npmjs.com/package/nuxt-google-maps-module)
[](https://npmjs.com/package/nuxt-google-maps-module)
[](https://github.com/airbnb/javascript)
> A NuxtJS module to import Google maps script
## Table of Contents ##
* [Requirements](#requirements)
* [Install](#install)
* [Getting Started](#getting-started)
* [Usage](#usage)
* [License](#license)
## Requirements
* npm
* NuxtJS
* NodeJS
## Install
```bash
$ npm install --save nuxt-google-maps-module
```
## Getting Started
Add `nuxt-google-maps-module` to `modules` section of `nuxt.config.js`.
```js
{
modules: [
// Simple usage
'nuxt-google-maps-module',
// With options
['nuxt-google-maps-module', {
/* module options */
key: 'GOOGLE MAPS KEY', // Default
}],
]
}
```
or even
```js
{
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:
```js
{
...
mounted() {
const autocomplete = new this.$google.maps.places.Autocomplete(inputElement,
{
types: ['geocode'],
},
);
},
...
}
```
## License
[MIT License](./LICENSE)