collective.geo.leaflet
This package use the collective.geo.* suite with leaflet.
Todo
[ ] Get “attribution” map from registry
[ ] Testing loading map with Robot
[x] Add uninstall profile
[x] Translations
[ ] Simple element view should use geojson
[ ] Use leaflet for control panel map
[ ] Use leaflet for configure map
Dependencies
collective.geo.behaviour
collective.geo.contentlocations
collective.geo.geographer
collective.geo.json
collective.geo.mapwidget
collective.geo.openlayers
collective.geo.settings
collective.js.leaflet
collective.z3cform.mapwidget
collective.z3cform.colorpicker
How to add baseLayer
What is a leaflet baseLayer : http://leafletjs.com/examples/layers-control.html
In Plone, if you want to add a baseLayer, you have to add a subscriber on collective.geo.geographer.interfaces.IGeoreferenced (for exemple, in configure.zcml):
<subscriber
for="collective.geo.geographer.interfaces.IGeoreferenced"
provides="collective.geo.leaflet.interfaces.IMapLayer"
factory=".maplayers.OpenStreetMap
/>
After, create your factory in python (maplayers.py):
from collective.geo.leaflet.maplayers import MapLayer
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
class OpenStreetMap(MapLayer):
name = u"osm"
title = _(u"Open Street Map")
index = ViewPageTemplateFile('browser/layers/osm.pt')
And add your javascript into a template file osm.pt:
<script type="text/javascript">
var osmAttrib = '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors';
var osmUrl = 'http://{s}.tile.osm.org/{z}/{x}/{y}.png';
var %(name)s = L.tileLayer(osmUrl, {
attribution: osmAttrib,
});
</script>
Tests
This package is tested using Travis CI. The current status is :
Contributors
Benoît Suttor, bsuttor@imio.be
Martin Peeters [Affinitic]
Changelog
1.0.1 (2019-10-07)
Fix default imagePath. [bsuttor]
1.0.0 (2019-10-07)
Fix default value of L.Icon.Default.imagePath if this default value is not yet loaded. [bsuttor]
Fix uninstall warning#1 [bsuttor]
Fix the default width for maps [mpeeters]
Fix typo in method absolute_url [mpeeters]
0.2.5 (2017-04-11)
Add image and address into geojson popup if values are in geojson properties. [bsuttor]
0.2.4 (2017-04-05)
Get geojson content into a #geojson object into a data-geojson attribute. [bsuttor]
0.2.3 (2016-09-20)
Add adapter for adapting geomap settings (as map_center, …) [bsuttor]
0.2.2 (2016-08-12)
Use google api key from control panel. [bsuttor]
Do not get js from relatif url anymore. [bsuttor]
0.2.1 (2016-03-24)
Fix bug, get coordiantes. [bsuttor]
0.2 (2016-03-23)
Add polygon and polyline support. [bsuttor]
0.1b8 (2015-11-27)
Remove old Topic support [bsuttor]
0.1b7 (2015-01-14)
Marker are not more hidden with google baselayer. [bsuttor]
0.1b6 (2015-01-14)
Remove Markercluster plugin because it do not run with control.layers. [bsuttor]
0.1b5 (2015-01-06)
Fix name of upgrade step profile. [bsuttor]
0.1b4 (2015-01-06)
Fix one french translation (‘recheche’ instead of ‘recherche’). [bsuttor]
Use Markercluster plugins (https://github.com/Leaflet/Leaflet.markercluster) with collective.js.leaflet. [bsuttor]
0.1b3 (2014-08-26)
Use a “local” version of leaflet-google.js downloaded from https://gist.github.com/crofty/2197042 [bsuttor]
0.1b2 (2014-08-21)
Fix an indentation error. [bsuttor]
Add collective_geo_styles indexer for dexterty content. [bsuttor]
Prevent attribute error for popup content. [bsuttor]
0.1b1 (2014-08-07)
Initial release. [bsuttor]
Metadata
Release files for collective.geo.leaflet 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| collective.geo.leaflet-1.0.1.tar.gz | 28.6 kB | Without provenance | Details for collective.geo.leaflet-1.0.1.tar.gz |
Release files / collective.geo.leaflet-1.0.1.tar.gz
| Download URL | collective.geo.leaflet-1.0.1.tar.gz |
|---|---|
| Size | 28.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fab6834e29f5f6399bfc8fb31ec655c11864f475cb518b541bca707091199414
|
|
BLAKE2b-256 checksum How to use checksums |
d143c1854f739b601a06110a97373ab3afc71e5aa2fa22268bf3ea73416a4855
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/38.7.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.15rc1
|
Security for collective.geo.leaflet 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.