Geolocation field and widget
Project description
This package provides a z3c.form field and a widget implementing LeafletJS from pat-leaflet to define Latitude / Longitude information.
This package is used as a dependency in some other Plone add-ons, like collective.geolocationbehavior but can also be used directly in your own content type schema:
from plone.formwidget.geolocation import GeolocationField ... geolocation = GeolocationField( title="Geolocation", description="Select the location of this content", )
The map marker has a popup containing object title / description (by default). The template and/or the class used to generate the popup content can be overridden to change it (see @@geolocation-geojson-popup view).
Versions
3.0.x -> Plone 6.0.x
2.2.x -> Plone 5.2.x
Translations
This product has been translated into
French
Contribute
License
The project is licensed under the GPLv2.
Changelog
3.0.7 (2024-08-28)
Update pat-leaflet = 2.2.0. See https://github.com/Patternslib/pat-leaflet/releases/tag/2.2.0 for more information. [petschki]
3.0.6 (2023-10-31)
Add default_input_zoom and default_display_zoom options in control panel [mpeeters]
3.0.5 (2023-06-28)
Fix controlpanel icon. [petschki]
Fix showing map when creating content and sanitize default lat/lng values with or without default initial configuration settings. [petschki]
3.0.4 (2023-06-02)
Fix usage of default location from configuration [mpeeters]
Ensure that the marker is the main marker to fix geosearch [mpeeters]
Add missing French translation [laulaz]
Add missing translation in widget display template [laulaz]
Updated resources: pat-leaflet=2.1.1, Patternslib=9.9.4 [petschki]
3.0.3 (2023-01-13)
Fix configlet: boolean field cannot be required (otherwise it is impossible to set it to False) [laulaz]
3.0.2 (2022-11-10)
Fix widget display mode: initialize map with actually saved lat/lon values. [petschki]
3.0.1 (2022-10-19)
Remove the height style from the geolocation input widget map. It is already set by pat-leaflet. [thet]
3.0.0 (2022-10-11)
Update to ES6 refactored @patternslib/pat-leaflet.
Integrate Plone resources with module federation. [petschki]
2.2.5 (2022-09-22)
Fix an issue when the geolocation is empty [mpeeters, laulaz]
Allow to change map marker popup default content (#35). See @@geolocation-geojson-popup view. [laulaz]
2.2.4 (2022-06-02)
Add French translations [laulaz]
Add plone.restapi deserializer (if plone.restapi is installed). [laulaz]
Allow to set default geolocation on new contents (via bool field in config). If not checked, the default geolocation is only used to center map. Also, the geolocation map will not show on an object if no geolocation was defined. [laulaz]
2.2.3 (2021-05-26)
Add plone.restapi serializer (if plone.restapi is installed). [bsuttor, laulaz]
Specify that latitude and longitude fields can be not required. [boulch]
Allow empty latitude and longitude. [bsuttor]
2.2.2 (2020-07-10)
Fix popup displaying the string “None” when no description was given. [parruc]
Add default_location information to maps-configuration view. [bsuttor]
2.2.1 (2019-06-07)
Translate map ids. [thet]
2.2.0 (2019-04-24)
add geolocation settings for leaflet [petschki]
Fix for Python 3. [pbauer]
2.1.3 (2017-12-06)
Only include the leaflet bundle where it is needed via add_bundle_on_request. [thet]
2.1.2 (2017-04-04)
Explicitly include necessary zcml dependencies to avoid having to explicitly doing that in tests. plone.app.testing disables z3c.autoinclude. [thet]
2.1.1 (2017-03-06)
Add upgrade step for changes in 2.1 + register missing upgrade steps for Plone 5 migration. [thet]
2.1 (2017-02-28)
Use bundle-leaflet from the plone.patternslib package. This should give an out-of-the-box leaflet integration. [thet]
2.0 (2016-10-06)
Make geolocation formwidget work with pat-leaflet. [thet]
Support for Plone 5 only, using plone.patternslib and providing an own bundle. [thet]
1.4 (2015-11-26)
Leaflet: After searching, bind new marker to update lat/lng input field and remove MarkerClusterGroup. Fix annoying ‘Uncaught Error: Couldn’t autodetect L.Icon.Default.imagePath, set it manually.’ [thet]
Update Leaflet dependencies. [thet]
1.3 (2015-07-15)
Add Leaflet as mapping widget. Use bower/grunt managed resources. [thet]
Remove the div.geolocation elements. Instead, render the list of geolocation points as JSON value on a data-geopoints attribute on the map element. [thet]
Reintroduce package level imports and avoid circular import by moving out the message factory. [thet]
Remove the map id attribute on the map element and use instead a map css class. [thet]
1.2.1 (2015-03-04)
Avoid circular imports by removing the package level imports. [thet]
1.2 (2015-03-04)
PEP8. [thet]
1.1 (2014-04-30)
Simplify templates and cleanup Google Map leftovers. [thet]
Convert default locations strings from Products.Maps to tuples with floats. [thet]
Improve handling of non-required geolocation fields with missing values. [davisagli]
Fix display template markup to be compatible with recent versions of Products.Maps. [davisagli]
Add supermodel import/export handler. [davisagli]
Fix declaration of exported names. [davisagli]
Remove dependency on Products.Maps. Don’t fail, if default_location is not set or maps_configuration adapter not found. [thet]
1.0 (2013-02-07)
Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file plone_formwidget_geolocation-3.0.7.tar.gz
.
File metadata
- Download URL: plone_formwidget_geolocation-3.0.7.tar.gz
- Upload date:
- Size: 2.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 957b647df036349ae8d48580ee892d84794fc5174fdb815983e4e06d2e203dcf |
|
MD5 | 20696f8753b792e426aaa3269413026b |
|
BLAKE2b-256 | f5903e231e8933f2fcf245601c35163496e47d562463fc5d9cf4fefc3ab587bd |
File details
Details for the file plone.formwidget.geolocation-3.0.7-py3-none-any.whl
.
File metadata
- Download URL: plone.formwidget.geolocation-3.0.7-py3-none-any.whl
- Upload date:
- Size: 2.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b67e16d36fc5d6058004c338fb2a1fe9a3e119ae0fb6131371ae82899e5c4d8 |
|
MD5 | 902bf403fa5875a6a9dc5ddec4a7505a |
|
BLAKE2b-256 | 7398aa11baafbdbd593f378f7f640c7ea8b74076c81f7a0d0a1442b06bae9926 |