使用活页JS库添加灵活内容的地理视图
collective.geo.leaflet的Python项目详细描述
collective.geo.leaflet
此软件包使用带有传单的collective.geo.*套件。
Dependencies
- 集体行为
- collective.geo.contentlocations
- collective.geo.geographer
- collective.geo.json
- collective.geo.mapWidget
- collective.geo.openlayers
- collective.geo.settings
- collective.js.传单
- collective.z3cform.mapWidget
- collective.z3cform.colorpicker
How to add baseLayer
什么是传单底层: http://leafletjs.com/examples/layers-control.html
在plone中,如果要添加一个基本层,则必须在collective.geo.geographer.interfaces.igorereferenced(例如,在configure.zcml中)上添加订户:
<subscriber for="collective.geo.geographer.interfaces.IGeoreferenced" provides="collective.geo.leaflet.interfaces.IMapLayer" factory=".maplayers.OpenStreetMap />
之后,用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')
并将javascript添加到模板文件中
<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>
Changelog
0.2.5 (2017-04-11)
- 如果值在geojson属性中,则将图像和地址添加到geojson弹出窗口中。 [b按钮]
0.2.4 (2017-04-05)
- 将geoJSON内容放入geoJSON对象,并将其放入数据geoJSON属性。 [b按钮]
0.2.3 (2016-09-20)
- 添加适配器以适应geomap设置(作为地图中心…) [b按钮]
0.2.2 (2016-08-12)
- 使用控制面板中的google api键。 [b按钮]
- 不再从relatif url获取js。 [b按钮]
0.2.1 (2016-03-24)
- 修正错误,得到协调。 [b按钮]
0.2 (2016-03-23)
- 添加多边形和多段线支持。 [b按钮]
0.1b8 (2015-11-27)
- 删除旧主题支持 [b按钮]
0.1b7 (2015-01-14)
- 标记在google baselayer中不会更隐藏。 [b按钮]
0.1b6 (2015-01-14)
- 删除markercluster插件,因为它不与control.layers一起运行。 [b按钮]
0.1b5 (2015-01-06)
- 修复升级步骤配置文件的名称。 [b按钮]
0.1b4 (2015-01-06)
- 修复一个法语翻译(“recheche”而不是“recherche”)。 [b按钮]
- 将markercluster插件(https://github.com/Leaflet/Leaflet.markercluster)与collective.js.fluel一起使用。 [b按钮]
0.1b3 (2014-08-26)
- 使用从https://gist.github.com/crofty/2197042下载的“本地”版本的传单-google.js [b按钮]
0.1b2 (2014-08-21)
- 修复缩进错误。 [b按钮]
- 为灵巧的内容添加集体地理样式索引器。 [b按钮]
- 防止弹出内容的属性错误。 [b按钮]
0.1b1 (2014-08-07)
- 初次发布。 [b按钮]