npm.io
1.0.1 • Published 3 years ago

strapi-plugin-google-geocoder

Licence
MIT
Version
1.0.1
Deps
2
Size
960 kB
Vulns
0
Weekly
0
Logo - google geocoder

Strapi v4 - google geocoder

A simple strapi plugin to geocode address, with @react-google-autocmplete input component

banner - google geocoder

How to install

# yarn
yarn add strapi-plugin-google-geocoder

# npm
npm i strapi-plugin-google-geocoder

Configuration

1. Add plugin in plugins.js
// config/plugins.js
...
...
"google-geocoder": {
    config: {
      apiKey: env("STRAPI_ADMIN_GOOGLE_MAPS_API_KEY"), // required,
      types: ['geocode'], // optional, default is 'geocode' - more info on  https://developers.google.com/maps/documentation/javascript/place-autocomplete#constrain-place-types
      componentRestrictions: { // optional
        country: ["it"], // restrict search result to specified country only
      } 
    },
},
...
...
2. Add custom field
instructions - google geocoder