Metadata-Version: 2.4
Name: djangocms-leaflet
Version: 0.0.6
Summary: django CMS plug-ins for the JavaScript map library Leaflet
Project-URL: Documentation, https://github.com/MacLake/djangocms-leaflet#readme
Project-URL: Issues, https://github.com/MacLake/djangocms-leaflet/issues
Project-URL: Source, https://github.com/MacLake/djangocms-leaflet
Author-email: Jens-Erik Weber <Jens-Erik.Weber@passiv.de>
License-Expression: MIT
License-File: LICENSE.txt
Keywords: Leaflet,django CMS
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.9
Requires-Dist: django-cms>=3.11
Requires-Dist: django>=3.2
Requires-Dist: requests>=2.31
Description-Content-Type: text/markdown

# djangocms-leaflet

This app provides plug-ins for the JavaScript map library [Leaflet](https://leafletjs.com/).

[![PyPI - Version](https://img.shields.io/pypi/v/djangocms-leaflet.svg)](https://pypi.org/project/djangocms-leaflet)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/djangocms-leaflet.svg)](https://pypi.org/project/djangocms-leaflet)

-----

**Table of Contents**

- [Installation](#installation)
- [License](#license)

## Installation

```console
pip install djangocms-leaflet
```

or add `djangocms-leaflet` to the dependencies of your project, e. g. in `pyproject.toml`:
```toml
dependencies = [
    # …
    'djangocms-leaflet',
    # …
]
```


Add it to `INSTALLED_APPS` in the settings::

```python
INSTALLED_APPS: list[str] = [
    # …
    'djangocms_leaflet',
    # …
]
```
## Usage

Add a map plugin to a placeholder and fill in the form. Add markers as sub plugins if needed.
In the template `src/djangocms_leaflet/templates/djangocms_leaflet/map.html` the tile server
of the OpenStreetMap website is defined. Make sure you comply with their usage policy or
use another tile server by replacing the tile server’s URL.

You can either specify latitude and longitude of the map or marker or enter a search term.
If no coordinates are entered, they will be searched with Nominatim and the first hit in the result list location will
be used as coordinates.

## License

`djangocms-leaflet` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.

## Integrated library

| Name                                                   | Description                | License                                                                       |
|--------------------------------------------------------|-----------------------------|-------------------------------------------------------------------------------|
| [Leaflet](https://leafletjs.com/)                      | JavaScript library for maps | [BSD-2-Clause license](https://github.com/Leaflet/Leaflet/blob/main/LICENSE)  |

