gridsome-source-gmaps-geocode
Advanced tools
Comparing version
{ | ||
"name": "gridsome-source-gmaps-geocode", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Geocode data from your Gridsome sources using the Google Maps Geocoding API.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# 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` | ||
```js | ||
module.exports = { | ||
@@ -25,2 +36,19 @@ ... | ||
} | ||
``` | ||
``` | ||
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: | ||
```graphql | ||
{ | ||
allOffice { | ||
edges { | ||
node { | ||
geocode { | ||
lat | ||
lng | ||
} | ||
} | ||
} | ||
} | ||
} | ||
``` |
2660
21.02%54
116%