Geolocation field and widget
Project description
This package provides a z3c.form field and a widget implementing LeafletJS from plone.patternslib to define Latitude / Longitude informations.
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 overriden to change it (see @@geolocation-geojson-popup view).
Limitations
Current branch is tested on Plone 5.2.x & Plone 6.0.x.
Translations
This product has been translated into
French
Contribute
License
The project is licensed under the GPLv2.
Changelog
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 defaut 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 informations 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 explictly 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 attrbute on the map element. [thet]
Reintroduce package level imports and avoid circular import by moving out the message factory. [thet]
Remove the map id attrbute 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
Hashes for plone.formwidget.geolocation-2.2.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa4b3fa9664d475842247c871fac25c1ef499782c39f97ee6d6b4ada6aee8f19 |
|
MD5 | c6c4b214c23756b26b9881ecb0a9ebae |
|
BLAKE2b-256 | edd959344b1d04233da1111036eb50c249056882a00d4129195815e17e26bb28 |
Hashes for plone.formwidget.geolocation-2.2.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e2208d99187290d4add09f5eca7afa13709a9fdf231b26c315a8d7d506f526a |
|
MD5 | a7466481f984a846138d342c766be19a |
|
BLAKE2b-256 | 6f2663df207a86a964cbcb6e538596836ed82d6ae8be1161e6a5b7a382fa0cf9 |