{"id":13530566,"url":"https://github.com/springload/wagtailgmaps","last_synced_at":"2025-04-09T18:17:38.552Z","repository":{"id":24173894,"uuid":"27564424","full_name":"springload/wagtailgmaps","owner":"springload","description":"Simple Google Maps address formatter for Wagtail fields","archived":false,"fork":false,"pushed_at":"2023-08-18T07:15:13.000Z","size":498,"stargazers_count":83,"open_issues_count":6,"forks_count":31,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-04-09T18:17:33.733Z","etag":null,"topics":["google-maps","wagtail"],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/wagtailgmaps","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/springload.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2014-12-04T23:07:31.000Z","updated_at":"2024-08-13T03:53:19.000Z","dependencies_parsed_at":"2024-01-07T13:09:51.095Z","dependency_job_id":"e49cf388-6ecc-4434-98cb-88308a8f874d","html_url":"https://github.com/springload/wagtailgmaps","commit_stats":{"total_commits":85,"total_committers":12,"mean_commits":7.083333333333333,"dds":0.6470588235294117,"last_synced_commit":"88f3fc6865f27d4a5adb7c7eaf7ce618d2c7e268"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springload%2Fwagtailgmaps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springload%2Fwagtailgmaps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springload%2Fwagtailgmaps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springload%2Fwagtailgmaps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/springload","download_url":"https://codeload.github.com/springload/wagtailgmaps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248085321,"owners_count":21045139,"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":["google-maps","wagtail"],"created_at":"2024-08-01T07:00:51.925Z","updated_at":"2025-04-09T18:17:38.523Z","avatar_url":"https://github.com/springload.png","language":"Python","funding_links":[],"categories":["Apps"],"sub_categories":["Widgets"],"readme":"# wagtailgmaps [![PyPI](https://img.shields.io/pypi/v/wagtailgmaps.svg)](https://pypi.python.org/pypi/wagtailgmaps)\n\n\u003e Simple Google Maps address formatter and LatLng provider for [Wagtail](https://wagtail.io/) fields.\n\n*Check out [Awesome Wagtail](https://github.com/springload/awesome-wagtail) for more awesome packages and resources from the Wagtail community.*\n\n![Wagtailgmaps screenshot](./screenshot.png)\n\n## Quickstart\n\n### Setting Up Your Google API Key\n\n1. Follow the instructions to [get a key](https://developers.google.com/maps/documentation/javascript/get-api-key)\n2. Enable the following services under `API Restrictions`:\n    * [Geocoding API](https://developers.google.com/maps/documentation/javascript/geocoding)\n    * [Maps Static API](https://developers.google.com/maps/documentation/static-maps/)\n    * [Maps JavaScript API](https://developers.google.com/maps/documentation/javascript/)\n    * [Maps Embed API](https://developers.google.com/maps/documentation/javascript/)\n\n![Google_API_Screenshot](./google-maps-api.png)\n\n### Installing and Configuration the Python Package\n\n1. Install with `pip install wagtailgmaps`\n2. Add `wagtailgmaps` to your `settings.py` `INSTALLED_APPS` section.\n3. Add some configuration in your `settings.py` file:\n\n    ```python\n    # Mandatory\n    WAGTAIL_ADDRESS_MAP_CENTER = 'Wellington, New Zealand'  # It must be a properly formatted address\n    WAGTAIL_ADDRESS_MAP_KEY = 'xxx'\n\n    # Optional\n    WAGTAIL_ADDRESS_MAP_ZOOM = 8  # See https://developers.google.com/maps/documentation/javascript/tutorial#MapOptions for more information.\n    WAGTAIL_ADDRESS_MAP_LANGUAGE = 'ru'  # See https://developers.google.com/maps/faq#languagesupport for supported languages.\n    ```\n\n4. Use it:\n\n    ```python\n    # myapp/models.py\n    from django.db import models\n    from wagtail.wagtailcore.models import Page\n    from wagtailgmaps.edit_handlers import MapFieldPanel\n\n    class MapPage(Page):\n        # Wagtailgmaps expects a `CharField` (or any other field that renders as a text input)\n        formatted_address = models.CharField(max_length=255)\n        latlng_address = models.CharField(max_length=255)\n\n        # Use the `MapFieldPanel` just like you would use a `FieldPanel`\n        content_panels = Page.content_panels + [\n            MapFieldPanel('formatted_address'),\n            MapFieldPanel('latlng_address', latlng=True),\n        ]\n    ```\n\n    ```html\n    # myapp/templates/myapp/map_page.html\n    \u003ca href=\"http://maps.google.com/?q={{ self.formatted_address }}\"\u003eOpen map (Formatted Address)\u003c/a\u003e\n    \u003ca href=\"http://maps.google.com/?q={{ self.latlng_address }}\"\u003eOpen map (Lat/Long Address)\u003c/a\u003e\n    ```\n\n## Additional information\n\n### `MapFieldPanel` options\n\n - `heading` - A custom heading in the admin, defaults to \"Location\"\n - `classname` - Add extra css classes to the field\n - `latlng` - Field returns a LatLng instead of an address\n - `centre` - A custom override for this field\n - `zoom` - A custom override for this field\n\n### How the address option works under the hook\n\nIf using the address option, the field gets updated according to the [Google Geocoding Service](https://developers.google.com/maps/documentation/geocoding/) each time:\n\n* The map marker gets dragged and dropped into a location (`dragend` JS event).\n* Click happens somewhere in the map (`click` JS event).\n* Return key is pressed after editing the field (`enterKey` JS event for return key only).\n\n### Troubleshooting\n\nWhen editing the model from the admin interface the affected field shows up with a map, like the screenshot above. If it doesn't, check your browser console to make sure that there is no error related to your API key.\n\n## Development\n\n### Releases\n\n- Make a new branch for the release of the new version.\n- Update the [CHANGELOG](https://github.com/springload/wagtailgmaps/CHANGELOG.md).\n- Update the version number in `wagtailgmaps/__init__.py`, following semver.\n- Make a PR and squash merge it.\n- Back on master with the PR merged, use `make publish` (confirm, and enter your password).\n- Finally, go to GitHub and create a release and a tag for the new version.\n- Done!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringload%2Fwagtailgmaps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspringload%2Fwagtailgmaps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringload%2Fwagtailgmaps/lists"}