Socket
Socket
Sign inDemoInstall

gridsome-source-gmaps-geocode

Package Overview
Dependencies
8
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gridsome-source-gmaps-geocode

Geocode data from your Gridsome sources using the Google Maps Geocoding API.


Version published
Weekly downloads
27
increased by22.73%
Maintainers
1
Install size
659 kB
Created
Weekly downloads
 

Readme

Source

gridsome-source-gmaps-geocode

Install

yarn add gridsome-source-gmaps-geocode

Or

npm install --save gridsome-source-gmaps-geocode

Usage

Configure the plugin in your gridsome.config.js

module.exports = {
  ...
  plugins: [
    {
      use: '@gridsome/source-filesystem',
      options: {
        path: '_content/**/*.md',
        typeName: 'Office'
      }
    },
    {
      use: 'gridsome-source-gmaps-geocode',
      options: {
        apiKey: 'your-gmaps-geocode-api-key-here',
        sourceTypeName: 'Office',
        sourceTypeField: 'address'
      }
    },
  ]
}

You will then be able to use access the gecode result for the value of the address field on each Office node via the geocode field on Office nodes:

{
  allOffice {
    edges {
      node {
        geocode {
          lat
          lng
        }
      }
    }
  }
}

Keywords

FAQs

Last updated on 07 Dec 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc