{"_id":"@blessmesanta/strapi-google-maps","name":"@blessmesanta/strapi-google-maps","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.4":{"name":"@blessmesanta/strapi-google-maps","version":"1.0.4","description":"A Google Maps custom field for Strapi, allowing you to pick a location.","repository":{"type":"git","url":"git+https://github.com/snphq/strapi-google-maps.git"},"bugs":{"url":"https://github.com/snphq/strapi-google-maps.git/issues"},"homepage":"https://github.com/snphq/strapi-google-maps.git","strapi":{"name":"google-maps","description":"A Google Maps custom field allowing you to pick a location.","kind":"plugin","displayName":"Google Maps"},"keywords":["strapi","strapi-plugin","strapi-plugin-google-maps","google-maps","strapi-google-maps","strapi-custom-field"],"dependencies":{"@react-google-maps/api":"^2.18.1","@strapi/design-system":"^1.6.3","@strapi/helper-plugin":"^4.6.0","@strapi/icons":"^1.6.3","axios":"^1.4.0","latlon-geohash":"^2.0.0","prop-types":"^15.7.2","react-geolocated":"^4.1.0"},"devDependencies":{"@strapi/typescript-utils":"^4.6.0","@types/react":"^18.2.6","@types/react-dom":"^17.0.18","@types/react-router-dom":"^5.3.3","@types/styled-components":"^5.1.26","react":"^17.0.2","react-dom":"^17.0.2","react-router-dom":"^5.3.4","semver":"^7.5.4","typescript":"5.0.4"},"peerDependencies":{"@strapi/strapi":"^4.0.0"},"author":{"name":"blesSmePadre"},"maintainers":[{"name":"blessmesanta","email":"alasha.khadzar@gmail.com"}],"engines":{"node":">=14.19.1 <=18.x.x","npm":">=6.0.0"},"scripts":{"develop":"tsc -p tsconfig.server.json -w","build":"tsc -p tsconfig.server.json"},"publishConfig":{"access":"public"},"license":"MIT","gitHead":"edf23018658be10b3dc77fc8b71abce4482aa524","_id":"@blessmesanta/strapi-google-maps@1.0.4","_nodeVersion":"16.15.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-9MLJClhSA8CekUWvHJtAZUCBj5oTZ/yHijcHAZz1j1FVDqpCQ+NuR+po/s563d9T58rhGOiS3w7LGrDPNw3+fg==","shasum":"80afb618e4819e67eb025921683611da700888ac","tarball":"https://registry.npmjs.org/@blessmesanta/strapi-google-maps/-/strapi-google-maps-1.0.4.tgz","fileCount":29,"unpackedSize":33247,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE8JrAN7CwzztDXObwEtHSyWo2rMzBvqi3/no72774qhAiAU0cBphrjpo9aPok8FavjMCJ0ye0btBVkWQFz0oakLWw=="}]},"_npmUser":{"name":"blessmesanta","email":"alasha.khadzar@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/strapi-google-maps_1.0.4_1690202379558_0.16542550604319595"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-24T12:39:39.487Z","1.0.4":"2023-07-24T12:39:39.750Z","modified":"2023-07-24T12:39:39.995Z"},"maintainers":[{"name":"blessmesanta","email":"alasha.khadzar@gmail.com"}],"description":"A Google Maps custom field for Strapi, allowing you to pick a location.","homepage":"https://github.com/snphq/strapi-google-maps.git","keywords":["strapi","strapi-plugin","strapi-plugin-google-maps","google-maps","strapi-google-maps","strapi-custom-field"],"repository":{"type":"git","url":"git+https://github.com/snphq/strapi-google-maps.git"},"author":{"name":"blesSmePadre"},"bugs":{"url":"https://github.com/snphq/strapi-google-maps.git/issues"},"license":"MIT","readme":"# 🚀🗺️ Strapi Google Maps\n\n![Preview](https://github.com/amicaldo/strapi-google-maps/blob/main/pictures/preview.png?raw=true)\n\nA Strapi plugin allowing you to implement a Google Maps custom field into your content-types, which can be used to pick and retrieve locations.\n\n## ✨ Usage\n\nThe API response of a Strapi content-type implementing this google-maps custom field could look as follows:\n\n```json\n{\n  \"data\": {\n    \"id\": 16,\n    \"attributes\": {\n      \"location\": {\n        \"coordinates\": {\n          \"lat\": 51.5164315,\n          \"lng\": 7.455616999999997\n        },\n        \"geohash\": \"u1jm1dm0bqyu\"\n      }\n    }\n  },\n  \"meta\": {}\n}\n```\n\nYou can configure this plugin inside your Strapi dashboard's settings tab (e.g. to enter your API key).\n\n![Configuration](https://github.com/amicaldo/strapi-google-maps/blob/main/pictures/configuration.png?raw=true)\n\n## ❗ Requirements\n\n- Strapi v4\n- To use the plugin without restrictions, you should consider getting an API key for the Google Maps Platform, with additional access to the Places API.\n\n## 🔧 Installation\n\nYou just need to install the `strapi-google-maps` package via npm, at the root of your strapi project.\n\n```bash\nnpm i @amicaldo/strapi-google-maps\n```\n\n**To make Google Maps work, you should take a look at the next section.**\n\nAfter restarting your Strapi app, Google Maps should be listed as one of your plugins.\n\n## 🚀 Strapi Configuration (required)\n\nAllow all Google Maps assets to be loaded correctly by customizing the **strapi::security** middleware inside `./config/middlewares.js`.\n\nInstead of:\n\n```js\nexport default [\n  // ...\n  'strapi::security',\n  // ...\n];\n```\n\nWrite:\n\n```js\nexport default [\n  // ...\n  {\n    name: 'strapi::security',\n    config: {\n      contentSecurityPolicy: {\n        useDefaults: true,\n        directives: {\n          'connect-src': [\"'self'\", 'https:'],\n          'script-src': [\"'self'\", 'https://maps.googleapis.com'],\n          'media-src': [\n            \"'self'\",\n            'blob:',\n            'data:',\n            'https://maps.gstatic.com',\n            'https://maps.googleapis.com',\n          ],\n          'img-src': [\n            \"'self'\",\n            'blob:',\n            'data:',\n            'https://maps.gstatic.com',\n            'https://maps.googleapis.com',\n            'khmdb0.google.com',\n            'khmdb0.googleapis.com',\n            'khmdb1.google.com',\n            'khmdb1.googleapis.com',\n            'khm.google.com',\n            'khm.googleapis.com',\n            'khm0.google.com',\n            'khm0.googleapis.com',\n            'khm1.google.com',\n            'khm1.googleapis.com',\n            'khms0.google.com',\n            'khms0.googleapis.com',\n            'khms1.google.com',\n            'khms1.googleapis.com',\n            'khms2.google.com',\n            'khms2.googleapis.com',\n            'khms3.google.com',\n            'khms3.googleapis.com',\n            'streetviewpixels-pa.googleapis.com',\n            'market-assets.strapi.io',\n          ],\n        },\n      },\n    },\n  },\n  // ...\n];\n```\n\n## 👨‍💻 Manual Installation (not recommended)\n\nNavigate into your Strapi's plugins folder and clone this repository.\nThen navigate into this plugin's directory.\n\n```bash\ncd ./src/plugins\ngit clone https://github.com/amicaldo/strapi-google-maps.git\ncd ./strapi-google-maps\n```\n\nInstall the dependencies using npm and compile the server side part.\n\n```bash\nnpm install\nnpm run build\n```\n\nFrom your project's root directory, enable the plugin inside `./config/plugins.js`.\n\n```js\nmodule.exports = {\n  // ...\n  'google-maps': {\n    enabled: true,\n    resolve: './src/plugins/strapi-google-maps',\n  },\n  // ...\n};\n```\n\n**To make Google Maps work, you should take a look at the previous section.**\n\nLastly, recompile the admin panel of your Strapi project.\n\n```bash\nnpm run build\n```\n","readmeFilename":"README.md"}