{"id":13568025,"url":"https://github.com/collective/volto-geocoding","last_synced_at":"2026-05-16T19:02:39.460Z","repository":{"id":66087570,"uuid":"276329447","full_name":"collective/volto-geocoding","owner":"collective","description":"Volto addon providing a widget to search addresses and save coordinates","archived":false,"fork":false,"pushed_at":"2020-07-08T07:35:58.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-01-09T09:53:56.765Z","etag":null,"topics":["addon","address","cms","geocoding","plone","volto"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/collective.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-07-01T09:05:06.000Z","updated_at":"2020-07-08T07:36:00.000Z","dependencies_parsed_at":"2023-02-27T01:30:39.482Z","dependency_job_id":null,"html_url":"https://github.com/collective/volto-geocoding","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/collective%2Fvolto-geocoding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/collective%2Fvolto-geocoding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/collective%2Fvolto-geocoding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/collective%2Fvolto-geocoding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/collective","download_url":"https://codeload.github.com/collective/volto-geocoding/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240898273,"owners_count":19875151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["addon","address","cms","geocoding","plone","volto"],"created_at":"2024-08-01T14:00:18.987Z","updated_at":"2026-05-16T19:02:34.408Z","avatar_url":"https://github.com/collective.png","language":"JavaScript","funding_links":[],"categories":["Add-ons"],"sub_categories":[],"readme":"# volto-geocoding\n\nA widget for [Volto](https://github.com/plone/volto) to search addresses and save coordinates.\nIt requires on the backend a JSON field to save data.\n\nTo be used with mrs-developer, see [Volto docs](https://docs.voltocms.com/customizing/add-ons/) for further usage informations.\n\n## Setup with voltocli\n\n```bash\nvoltocli\n```\n\nand insert `volto-geocoding` as addon name and `git@github.com:collective/volto-geocoding.git` as addon URL.\n\n## Manual setup\n\nIn your Volto project:\n\n```bash\nyarn add mrs-developer collective/volto-geocoding\n```\n\nand in `package.json`:\n\n```json\n  \"scripts\": {\n    \"develop:npx\": \"npx -p mrs-developer missdev --config=jsconfig.json --output=addons\",\n    \"develop\": \"missdev --config=jsconfig.json --output=addons\",\n    \"preinstall\": \"if [ -f $(pwd)/node_modules/.bin/missdev ]; then yarn develop; else yarn develop:npx; fi\",\n    \"postinstall\": \"yarn omelette\",\n    ...\n  }\n```\n\nCreate a `mrs.developer.json` file:\n\n```json\n{\n  \"volto-geocoding\": {\n    \"url\": \"git@github.com:collective/volto-geocoding.git\"\n  }\n}\n```\n\nIn `jsconfig.json`:\n\n```json\n{\n  \"compilerOptions\": {\n    \"paths\": {\n      \"volto-geocoding\": [\"addons/volto-geocoding\"]\n    },\n    \"baseUrl\": \"src\"\n  }\n}\n```\n\nFix tests, in `package.json`:\n\n```json\n\"jest\": {\n    ...\n    \"moduleNameMapper\": {\n      \"@plone/volto/(.*)$\": \"\u003crootDir\u003e/node_modules/@plone/volto/src/$1\",\n      \"@package/(.*)$\": \"\u003crootDir\u003e/src/$1\",\n      \"volto-geocoding/(.*)$\": \"\u003crootDir\u003e/src/addons/volto-geocoding/src/$1\",\n      \"~/(.*)$\": \"\u003crootDir\u003e/src/$1\"\n    },\n    \"testMatch\": [\n      \"**/__tests__/**/*.[jt]s?(x)\",\n      \"**/?(*.)+(spec|test).[jt]s?(x)\",\n      \"!**/src/addons/volto/**/*\"\n    ],\n    ...\n```\n\nEdit `.eslintrc`:\n\n```json\n{\n  \"extends\": \"./node_modules/@plone/volto/.eslintrc\",\n  \"settings\": {\n    \"import/resolver\": {\n      \"alias\": {\n        \"map\": [\n          [\"@plone/volto\", \"@plone/volto/src\"],\n          [\"@package\", \"./src\"],\n          [\"volto-geocoding\", \"./src/addons/volto-geocoding/src\"]\n        ],\n        \"extensions\": [\".js\", \".jsx\", \".json\"]\n      },\n      \"babel-plugin-root-import\": {\n        \"rootPathSuffix\": \"src\"\n      }\n    }\n  }\n}\n```\n\nAdd `src/addons` in `.gitignore`:\n\n```\n# .gitignore\nsrc/addons\n```\n\nThen, run `yarn` and install dependencies:\n\n```bash\nyarn\n```\n\n## Usage\n\nOnce you've installed the addon, you have to configure it.\n\nDue to `react-leaflet` dependency needs, you have to add in the `\u003chead\u003e` its stylesheets, so:\n\n```jsx\n// in Html.jsx\n\n       \u003chead\u003e\n          ...\n\n          \u003clink\n            rel=\"stylesheet\"\n            href=\"https://unpkg.com/leaflet@1.6.0/dist/leaflet.css\"\n            integrity=\"sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==\"\n            crossOrigin=\"\"\n          /\u003e\n       \u003c/head\u003e\n```\n\nThen, use the widget for the field you need:\n\n```js\n// config.js\n\nimport { GeoLocationWidget } from 'volto-geocoding';\n\nexport const widgets = {\n  ...defaultWidgets,\n  id: {\n    ...defaultWidgets.id,\n    geolocation: GeoLocationWidget,\n  },\n};\n```\n\n### Map\n\nThis library exports not only `GeoLocationWidget` but also a component to render a map using OpenStreetMap: `OSMMap`.\nYou can find it in `src/components/OSMMap/OSMMap.jsx`.\n\nIt's a very simple map component accepting a point in coordinates (latitude, longitude) and an address (or description) to be shown within the popup.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcollective%2Fvolto-geocoding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcollective%2Fvolto-geocoding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcollective%2Fvolto-geocoding/lists"}