Metadata-Version: 2.4
Name: collective.geolocationbehavior
Version: 2.0.0
Summary: Dexterity behavior to add geographic locations to contents.
Author-email: "Jesse Snyder, davisagli et al" <collective@plone.org>
License-Expression: GPL-2.0-or-later
Project-URL: Homepage, https://github.com/collective/collective.geolocationbehavior/
Project-URL: Issues, https://github.com/collective/collective.geolocationbehavior/issues
Project-URL: Changelog, https://github.com/collective/collective.geolocationbehavior/blob/master/CHANGES.rst
Keywords: plone,dexterity,behavior,geographic,locations,contents
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Plone
Classifier: Framework :: Plone :: 6.1
Classifier: Framework :: Plone :: 6.2
Classifier: Framework :: Plone :: Addon
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE.GPL
License-File: LICENSE.txt
Requires-Dist: Products.CMFCore
Requires-Dist: Products.GenericSetup
Requires-Dist: plone.app.dexterity
Requires-Dist: plone.autoform
Requires-Dist: plone.behavior
Requires-Dist: plone.browserlayer
Requires-Dist: plone.formwidget.geolocation
Requires-Dist: plone.indexer
Requires-Dist: plone.supermodel
Requires-Dist: plone.uuid
Requires-Dist: zope.annotation
Requires-Dist: zope.component
Requires-Dist: zope.event
Requires-Dist: zope.i18nmessageid
Requires-Dist: zope.interface
Requires-Dist: zope.lifecycleevent
Provides-Extra: test
Requires-Dist: Products.CMFPlone; extra == "test"
Requires-Dist: plone.api; extra == "test"
Requires-Dist: plone.app.contenttypes[test]; extra == "test"
Requires-Dist: plone.app.testing; extra == "test"
Requires-Dist: plone.dexterity; extra == "test"
Dynamic: license-file

==============================
collective.geolocationbehavior
==============================

This package provides a Dexterity based behaviors for
`Geotagging <https://en.wikipedia.org/wiki/Geotagging>`_.


Features
========

- Implements the `plone.formwidget.geolocation <https://github.com/collective/plone.formwidget.geolocation>`_ add-on which adds `LeafletJS <https://leafletjs.com/>`_ support.
- Adds catalog indexes/metadata for latitude/longitude to support GeoJSON feature list output/filtering.
- The GeoJSON properties can be customized with the provided ``IGeoJSONProperties`` adapter.


Screenshots
===========

After installation, you will find a new behavior available, go to ``Site Setup`` > ``Content Types`` there select a content type and
click on the ``Behaviors`` tab, there you can see the new behavior called ``geolocatable`` as the following screenshot:

.. figure:: https://raw.githubusercontent.com/collective/collective.geolocationbehavior/refs/heads/master/docs/images/igeolocatable_behavior.png
   :align: center
   :height: 77px
   :width: 876px
   :alt: The 'IGeolocatable' Behavior

   The ``IGeolocatable`` Behavior.

----

.. figure:: https://raw.githubusercontent.com/collective/collective.geolocationbehavior/refs/heads/master/docs/images/igeolocatable_behavior_used.png
   :align: center
   :height: 320px
   :width: 800px
   :alt: Using the 'IGeolocatable' Behavior into a custom content type

   Using the ``IGeolocatable`` Behavior into a custom content type.


Examples
========

This add-on can be seen in action at the following add-ons:

- https://github.com/collective/collective.collectionfilter
- https://github.com/collective/collective.contentsections
- https://github.com/collective/collective.venue


Translations
============

This product has been translated into:

- German
- France
- Italian
- Spanish


Compatibility
=============

Version 2.x supports Plone 6.1 and 6.2 on Python 3.10 to 3.14 and is a
`PEP 420 <https://peps.python.org/pep-0420/>`_ native namespace package.
Do not mix it with ``collective.*`` packages that still declare the namespace
via ``pkg_resources``; in such environments (for example Plone 6.1 buildouts
with older add-ons) install `horse-with-no-namespace
<https://pypi.org/project/horse-with-no-namespace/>`_.

For Plone 5.2 and 6.0 use the 1.7.x releases.


Installation
============

If you installed Plone with `Cookieplone`_, you can install ``collective.geolocationbehavior`` add-on
from a source control system such as GitHub.

Add a line with ``collective.geolocationbehavior`` in the ``backend/requirements.txt`` file.

::

    collective.geolocationbehavior

Next add the add-on to ``zcml_package_includes`` in the file ``backend/instance.yaml`` so
that its configuration will load.

::

    default_context:
        zcml_package_includes: project_title, collective.geolocationbehavior

Finally, add the package's source to the ``mx.ini`` file.

::

    [collective.geolocationbehavior]
    url = https://github.com/collective/collective.geolocationbehavior.git
    pushurl = git@github.com:collective/collective.geolocationbehavior.git
    branch = master

To actually download and install the new add-on, run the following command.

::

    make backend-build

Now restart the backend.

----

If you installed Plone with `buildout`_, you can install ``collective.geolocationbehavior`` add-on
by adding it to your ``buildout`` eggs list like so:

::

   [buildout]

    ...

    eggs =
        collective.geolocationbehavior


and then running ``bin/buildout``

Now restart the instance.


Contribute
==========

- Issue Tracker: https://github.com/collective/collective.geolocationbehavior/issues
- Source Code: https://github.com/collective/collective.geolocationbehavior


Support
=======

If you are having issues, please let us know at our `issue tracker <https://github.com/collective/collective.geolocationbehavior/issues>`_.


License
=======

The project is licensed under the GNU General Public License, version 2 or
(at your option) any later version (``GPL-2.0-or-later``), see ``LICENSE.txt`` and
`LICENSE.GPL <https://raw.githubusercontent.com/collective/collective.geolocationbehavior/refs/heads/master/LICENSE.GPL>`_.

.. _Cookieplone: https://github.com/plone/cookieplone
.. _buildout: https://6.docs.plone.org/admin-guide/add-ons.html#buildout

Changelog
=========

.. towncrier release notes start

2.0.0 (2026-11-12)
------------------

Breaking changes:


- Require Plone 6.1 or 6.2 and Python 3.10 to 3.14, drop support for
  Plone 5.2 and 6.0.
  [erral, petschki]
- Switch to a PEP 420 native namespace package (no ``collective/__init__.py``
  with ``pkg_resources`` namespace declaration any more). Mixing native and
  ``pkg_resources``-style packages in the ``collective`` namespace does not
  work; in environments that still contain old-style ``collective.*`` eggs
  (typically Plone 6.1 buildouts) use ``horse-with-no-namespace``.
  [erral, petschki]


New features:


- Add Spanish translation and new translation strings.
  [macagua]
- Complete the German translation.
  [petschki]


Internal:


- Add an integration test suite (install/uninstall, behavior registration,
  ``latitude``/``longitude`` indexes and metadata, GeoJSON properties adapter)
  and a ``test`` extra, run on Plone 6.1 and 6.2 in CI.
  [petschki]
- Fixed some errors from code-analysis scripts.
  [macagua]
- Move package metadata from ``setup.py`` to ``pyproject.toml``.
  [petschki]
- Move to the ``src/`` layout and configure the repository with plone/meta
  (2.11.1): tox, GitHub workflows, pre-commit with pyupgrade, isort, black,
  zpretty, flake8, codespell, check-manifest, pyroma, i18ndude.
  [erral, petschki]
- Remove the obsolete ``buildout.cfg`` and ``docs/INSTALL.txt``; fix
  ``build-i18n.sh`` for the ``src/`` layout.
  [petschki]
- Replace the deprecated ``pkg_resources`` probe for ``plone.app.multilingual``
  with ``importlib`` (setuptools 81+ warns about ``pkg_resources``).
  [petschki]
- Update configuration files.
  [plone devs]
- Use the SPDX license expression ``GPL-2.0-or-later`` (matching the
  license grant in ``LICENSE.txt``) instead of the deprecated license
  classifier; ``LICENSE.txt`` moved to the package root next to
  ``LICENSE.GPL``.
  [petschki]


1.7.2 (2021-09-16)
------------------

- Fix Italian .po file location
  [laulaz]

- Add French translation
  [laulaz]


1.7.1 (2020-07-10)
------------------

- Do not use autoinclude for ZCML, load explicit.
  [jensens]


1.7.0 (2019-12-09)
------------------

- Make geolocation language independent
  [agitator]


1.6.0 (2019-04-24)
------------------

- Add ``IGeoJSONProperties`` adapter.
  [petschki]

- Add latitude/longitude indexer.
  [petschki]

- Add uninstall profile.
  [petschki]

- Prepare testing environment.
  [petschki]


1.5.1 (2017-04-04)
------------------

- Explicitly include necessary zcml dependencies to avoid having to explicitly doing that in tests.
  plone.app.testing disables z3c.autoinclude.
  [thet]


1.5 (2016-10-06)
----------------

- Register the ``collective.geolocationbehavior.geolocation.IGeolocatable`` behavior under the name ``geolocatable``.
  Do not bind ``for`` because its superfluous.
  [thet, jensens]

- Code cleanup, remove BBB classes.
  [thet]


1.4 (2015-07-15)
----------------

- Install the plone.formwidget.geolocation default profile in order to get
  Leaflet map support.
  [thet]

- Fix upgrade step with broken persistent classes and re-create BBB class
  definitions for upgrading. Reindex the object while upgrading to get updated
  object_provides indexes.
  [thet]


1.3.2 (2015-03-04)
------------------

- Fix the import bug, introduced of previous commit.


1.3.1 (2015-03-04)
------------------

- Fix import of GeolocationField.


1.3 (2015-03-04)
----------------

- Remove browserlayer, which isn't needed any more. Includes an Upgrade step.
  [thet]

- Switch to Attribute storage instead of Annotation storage. This is easier to
  access and needs less ZODB unpickling. It's unlikely that two behaviors share
  the same geolocation schema name. A upgrade step is provided.
  [thet]

- Removed code related to Google Maps integration. The integration is better
  done with Mockup Javascript.
  [thet]

- PEP8.
  [thet]


1.2 (2014-04-30)
----------------

- Add italian translation
  [gborelli]

- Remove dependency on Products.Maps and copy some of it's interfaces to here.
  Note, Google Map integration is not available at this point.
  For mapping functionality I suggest to backport the Leaflet integration from
  collective.venue.
  [thet]

- Remove dependency on Grok and use Dexterity 2 way with plone.supermodel to
  define the schema.
  [thet]


1.1.0.2 (2012-09-21)
--------------------

- 1.1 was somehow broken again


1.1 (2012-09-21)
----------------

- Fix egg, add authors


1.0 (2012-09-21)
----------------

- Initial release
