Skip to main content

Maps integration into cone using leaflet.js.

Project description

Latest PyPI version Number of PyPI downloads Test cone.maps

This package provides maps integration in to cone.app.

Map Widget

A map widget tile is included which provides OOTB default map behavior and can be used as starting point for complex custom maps.

from cone.maps.browser.map import MapTile
from cone.tile import tile
from myplugin import MyModel

@tile(name='map', interface=MyModel)
class MyMap(MapTile):
    """See ``cone.maps.browser.map`` for available tile options.
    """

Not that cone.maps defines by default no height for maps. This must be done explicitely using CSS, or via custom JS map class.

Resources

The following cone.maps related application configuration options are available :

  • cone.maps.public: Flag whether browser resources are delivered for unauthenticated users. Defaults to false.

  • cone.maps.nogap: Flag whether to include Leaflet.TileLayer.NoGap plugin. Defaults to false.

  • cone.maps.geosearch: Flag whether to include leaflet-geosearch plugin. Defaults to false.

  • cone.maps.markercluster: Flag whether to include Leaflet.markercluster plugin. Defaults to false.

  • cone.maps.editable: Flag whether to include Leaflet.Editable plugin. Defaults to false.

  • cone.maps.pathdrag: Flag whether to include Path.Drag.js plugin. Defaults to false.

  • cone.maps.activearea: Flag whether to include Leaflet-active-area plugin. Defaults to false.

  • cone.maps.proj4: Flag whether to include proj4js and Proj4Leaflet plugins. Defaults to false.

Contributors

  • Robert Niederreiter

TODO

  • Default map marker rendering (from DOM elem data directly and from JSON endpoint)

  • Default map markercluster rendering (from DOM elem data directly and from JSON endpoint)

  • Geosearch on default map.

  • Activearea config on default map.

Changes

1.1.0 (2026-02-03)

  • Refactor package layout to use pyproject.toml and implicit namespace packages. [rnix]

  • Setup Makefile. [lenadax]

  • Run tests with pytest. [lenadax]

  • Add Path.Drag.js to resources. [rnix]

  • Add Leaflet.Editable to resources. [rnix]

  • Map settings are defined via MapTile.map_settings property. [rnix]

  • Map settings gets rendered as single data attribute. [rnix]

  • Add MapTile.map_bounds property. [rnix]

  • Fix control layers creation in Map.create_controls. [rnix]

  • Implement map markers from JSON source. [rnix]

  • Implement static map markers. [rnix]

0.1 (2021-11-21)

  • Initial release. [rnix]

License

Copyright (c) 2021-2025, Cone Contributors All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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

cone_maps-1.1.0.tar.gz (598.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cone_maps-1.1.0-py3-none-any.whl (615.6 kB view details)

Uploaded Python 3

File details

Details for the file cone_maps-1.1.0.tar.gz.

File metadata

  • Download URL: cone_maps-1.1.0.tar.gz
  • Upload date:
  • Size: 598.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for cone_maps-1.1.0.tar.gz
Algorithm Hash digest
SHA256 2a952974cb949341c717bda05f0d4d44f9f4a83920ae509471aa78d1888bc894
MD5 eca989a3cfd12e557f3ce36022b67244
BLAKE2b-256 9c5b5fa77fbb8959270bfa2e52a664b38e25a2bcd2f3242b356049ee9a885a6d

See more details on using hashes here.

File details

Details for the file cone_maps-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: cone_maps-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 615.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for cone_maps-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ff8e981c654523916bdaf0aa84be6124d020bb6b23abe7d1488d8cf9f09d623
MD5 bbb6a75c4f76c8ff9e2b165d15672fc9
BLAKE2b-256 05ee9a39b356c4754bb9046f513eca96cdd00d10b73e60550f05ec25e8e96a91

See more details on using hashes here.

Supported by

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