1.0.8 • Published 1 year ago

strapi-plugin-google-map-picker v1.0.8

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
github
Last release
1 year ago

🗿 How to install

# yarn
yarn add strapi-plugin-google-map-picker

# npm
npm i strapi-plugin-google-map-picker

🔧 Configuration

1. Add plugin in plugins.js

// config/plugins.js
...
...
"google-map-picker": {
    config: {
    apiKey: env("GOOGLE_PUBLIC_KEY"), // required
    default_center: { lat: 54.106438, lng: 11.556940 }, // required
    favorites_places: [
        {
        title: "Berlin",
        coordinates: { lat: 52.518536, lng: 52.518536 },
        },
        {
        title: "Zurich",
        coordinates: { lat: 47.384168, lng: 8.526831 },
        },
        {
        title: "Oslo",
        coordinates: { lat: 59.911002, lng: 10.756167},
        },
    ],
    },
},
...
...

2. Add "strapi::security" in middlewares.js

// config/middlewares.ts
...
...
'strapi::errors',
{
  name: "strapi::security",
  config: {
  contentSecurityPolicy: {
    directives: {
      "script-src": ["'self'", "maps.googleapis.com", "maps.gstatic.com"],
      "img-src": ["'self'", "data:", "maps.googleapis.com", "maps.gstatic.com"],
    },
  },
  },
},
'strapi::cors',
...
...

3. Add custom field

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago