NuxtJS module for Google Maps
- Load Google Maps JavaScript API script only when required (once
$gmaps()is called) - TypeScript support
- Add
nuxt-mapsdependency to your project:
npm install nuxt-maps- Add
nuxt-mapsmodule and configuration tonuxt.config.js:
export default {
// ...other config options
modules: ["nuxt-maps"];
maps: {
apiKey: 'XXXXXXXXXXXXXXXXX',
}
}- (Optional) TypeScript support. Add
nuxt-mapsto thetypessection oftsconfig.json:
{
"compilerOptions": {
"types": ["nuxt-maps"]
}
}- Type:
String
Your Google API Key.
- Type:
Boolean - Default:
false
Enable i18n-module integration.
...
See the LICENSE file for license rights and limitations (MIT).