Skip to main content

django CMS plug-ins for the JavaScript map library Leaflet

Project description

djangocms-leaflet

This app provides plug-ins for the JavaScript map library Leaflet.

PyPI - Version PyPI - Python Version


Table of Contents

Installation

pip install djangocms-leaflet

or add djangocms-leaflet to the dependencies of your project, e. g. in pyproject.toml:

dependencies = [
    # …
    'djangocms-leaflet',
    # …
]

Add it to INSTALLED_APPS in the settings::

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 license.

Integrated library

Name Description License
Leaflet JavaScript library for maps BSD-2-Clause license

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djangocms_leaflet-0.0.4.tar.gz (139.7 kB view hashes)

Uploaded Source

Built Distribution

djangocms_leaflet-0.0.4-py3-none-any.whl (186.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page