Plone的Leaflet地图集成
项目描述
描述
使用Leaflet地图增强您的Plone网站。本包的Leaflet版本为0.7.3。
https://github.com/Leaflet/Leaflet
此插件注册了Leaflet的基础JavaScript和CSS资源,以及一些有趣的Leaflet插件。通过安装此插件,基础Leaflet地图资源将自动集成。要激活某些插件,您需要将这些资源包之一添加到您的registry.xml注册表中。
leaflet.markercluster - https://github.com/Leaflet/Leaflet.markercluster
leaflet.fullscreen - https://github.com/brunob/leaflet.fullscreen
leaflet.zoomfs - https://github.com/elidupuis/leaflet.zoomfs
leaflet.geosearch - https://github.com/smeijer/L.GeoSearch
leaflet.geosearch.openstreetmap
leaflet.geosearch.bing
leaflet.geosearch.esri
leaflet.geosearch.google
leaflet.geosearch.nokia
leaflet.draw - https://github.com/Leaflet/Leaflet.draw
leaflet.stamen - http://maps.stamen.com/
leaflet.locatecontrol - https://github.com/domoritz/leaflet-locatecontrol
leaflet.MiniMap - https://github.com/Norkart/Leaflet-MiniMap
leaflet.providers - https://github.com/leaflet-extras/leaflet-providers leaflet.awesome-markers - https://github.com/lvoogdt/Leaflet.awesome-markers
由于此插件仅提供Leaflet资源,您最终需要提供一些HTML标记用于地图,并编写自定义的JavaScript集成代码以使Leaflet地图工作。
您可以在/@@LeafletMapView找到示例视图。
您可以在这里观看演示视频: Youtube DEMO。
待办事项
编写适当的测试。
致谢
公司
贡献者
Eric BREHAULT <eric.brehault@makina-corpus.com>
Johannes Raggam <dev@programmatic.pro>
collective.js.leaflet 安装
要安装collective.js.leaflet到全局Python环境(或工作环境),使用传统的Zope 2实例,您可以这样做
当您阅读此内容时,您可能已经运行了
``easy_install collective.js.leaflet``.在此处了解如何安装setuptools(以及EasyInstall):http://peak.telecommunity.com/DevCenter/EasyInstall
如果您正在使用Zope 2.9(不是2.10),请获取pythonproducts并通过以下方式安装它
python setup.py install --home /path/to/instance到您的Zope实例。
在/path/to/instance/etc/package-includes目录中创建一个名为collective.js.leaflet-configure.zcml的文件。该文件应仅包含以下内容
<include package="collective.js.leaflet" />
或者,如果您使用zc.buildout和plone.recipe.zope2instance配方来管理项目,您可以这样做
将collective.js.leaflet添加到要安装的egg列表中,例如
[buildout] ... eggs = ... collective.js.leaflet告诉plone.recipe.zope2instance配方安装ZCMLslug
[instance] recipe = plone.recipe.zope2instance ... zcml = collective.js.leaflet重新运行buildout,例如使用
$ ./bin/buildout
如果您将明确从另一个包的configure.zcml文件中包含该包,则可以跳过ZCMLslug。
变更日志
1.0.0 (2018-10-10)
迁移到Plone 5 [mpeeters]
0.7.1 (2015-06-25)
将所有JavaScript注册设置为可缓存的和可烹饪的True。[thet]
删除leaflet.ie.css,因为它已从Leaflet中删除。[thet]
0.7 (2014-08-26)
更新本包的Leaflet版本(现在为0.7.3)。[bsuttor]
0.6 (2014-04-30)
Leaflet 和插件更新,日期为 2013-06-24。[thet]
0.5 (2013-06-11)
添加了一些有趣的插件,并引入了捆绑概念以启用单个插件。[thet]
新的 Leaflet 资源结构:直接从 Github 获取源代码,并将资源目录调整为使用新的子目录。此更改与旧版本兼容。[thet]
PEP8 清理。[thet]
0.4.4.1 (2012-09-24)
修复 CSS 图像 URL [ebrehault]
0.4.4 (2012-09-13)
升级到 Leaflet 0.4.4 [ebrehault]
注意:我们现在使用 Leaflet 库版本作为 egg 版本。
0.3.3 (2012-09-03)
修复 egg [ebrehault]
0.3.2 (2012-08-02)
升级到 Leaflet 0.4 [ebrehault]
0.3.1.5 (未发布)
目前还没有变化。
0.3.1.4 (2012-02-24)
修复背景 URL
0.3.1.3 (2012-02-24)
FIX:仅在 ie 上启用 ie css [kiorky]
0.3.1.2 (2012-02-24)
修复 plone < 41 [kiorky]
0.3.1 (2012-02-23)
初始发布 [kiorky]