openlayers support for Plone
Project description
collective.geo.openlayers
Introduction
collective.geo.openlayers enables Openlayers machinery into Plone.
Requirements
Plone >= 3
Installation
You can install collective.geo.openlayers as part of a specific project’s buildout, by having a buildout configuration such as:
[buildout] ... eggs = collective.geo.openlayers ...
Install this product from the Plone control panel.
Integration example
You can include openlayers in a Plone browser page in this way (for further information about openlayers see other openlayers examples):
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:metal="http://xml.zope.org/namespaces/metal" xmlns:tal="http://xml.zope.org/namespaces/tal" metal:use-macro="here/main_template/macros/master"> <head> <metal:block fill-slot="top_slot" tal:define="dummy python:request.set('disable_border',1); portal_state context/@@plone_portal_state; portal_url portal_state/portal_url" /> <metal:block metal:fill-slot="javascript_head_slot"> <script type="text/javascript" tal:attributes="src string:$portal_url/OpenLayers.js"></script> <script type="text/javascript"> jq(window).bind('load', function() { map = new OpenLayers.Map( 'map'); layer = new OpenLayers.Layer.OSM( "Simple OSM Map"); map.addLayer(layer); map.setCenter( new OpenLayers.LonLat(-71.147, 42.472).transform( new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject() ), 12 ); }); </script> </metal:block> </head> <body> <metal:content-core fill-slot="content-core"> <metal:content-core define-macro="content-core"> <div id="map" class="olMap" style="width:100%;height: 500px;"> <!-- openlayers map --> </div> </metal:content-core> </metal:content-core> </body> </html>
Contributors
Giorgio Borelli - gborelli
Silvio Tomatis - silviot
David Breitkreutz - rockdj
Gerhard Weis - gweis
Changelog
0.2.3 (2011-09-05)
added integration example in readme file [gborelli]
plone 4.1 fixes [gborelli]
changed Browser import from Testing.testbrowser [gborelli]
added z3c.autoinclude entry point [gborelli]
0.2.2 (2010-12-28)
fixed css registry entries [gborelli]
0.2.1 (2010-11-13)
Updated Openlayers to 2.10 version
0.2 (2010-10-31)
renamed cgeo-openlayers css and included in css registry [gborelli]
removed openlayers-macros [gborelli]
Added CSS for definition lists within the framed cloud popups, as used in collective.geo.kml [rockdj]
Added ZCML registration for all skin subdirectories. Without this, elements like the Edit toolbar don’t appear when Plone isn’t running in debug mode. [rockdj]
Updated OpenLayers.js to 2.8 (+styles and resources)
Register all browser pages and resources for IOpenLayers browser layer
Removed geo-point.js in favour of editing features provided by OpenLayers
Updated coordinate reference order to be consistent with WGS 1984 reference system. This involves standardising the coordinate order to be [longitude, latitude] rather than [latitude, longitude]. [rockdj]
Gave the Map element a relative position via CSS to allow Plone drop-down menus to appear over the top (z-index doesn’t apply unless position is specified). [rockdj]
Added ZCML registration for ‘img’ and ‘theme’ skin subdirectories. Without registration, these folders are unable to be seen in Plone and the OpenLayers controls don’t appear. [rockdj]
Added unit tests to ensure skin subdirectory registration works. [rockdj]
0.1 (2009-06-19)
Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for collective.geo.openlayers-0.2.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8704cd932582dea6a70038a320cacdf28b61ba964798c37b02e11fa67f771416 |
|
MD5 | 9b467dbd1a96bcdda4e07476460466fb |
|
BLAKE2b-256 | b62e0cbf4034389b98ceff503dd10ef27583b4b49d82915e45e2931eb7f110c1 |