A simple, easy to use Plone integration with Google Maps
Project description
A Google Maps solution for Plone
The main purpose of this product is to provide a very simple to use Google Maps integration for Plone. The following goals were set for development:
- Ease of use
Add locations to a folder
Set the view of the folder to Map
It figures out how to center and zoom the map automatically
Flexibility for enhancement by using the Zope 3 component architecture
Sane fallbacks when Javascript is not available
Clean separation of javascript, templates and logic
Works on Topics
Installation
Maps shows up in the “Add-ons” configuration panel.
Implementing custom content with map field
If you want to add location foeld to your custom content type, you should implement the following steps:
Add GeoLocation field:
from Products.Maps.field import LocationWidget, LocationField from Products.Maps.interfaces import IMapEnabled, ILocation MyContentSchema = ... LocationField('geolocation', required=False, searchable=False, validators=('isGeoLocation',), widget = LocationWidget(label = u'Event location'), ), ...
Update your class definition:
class MyContent(ATCTContent): """ my content description """ implements(IMyContent, IMapEnabled, ILocation) ... def getMarkerIcon(self): """ Can be implemented as select field. See Maps.Location content """ return "Red Marker"
Add following snippet to custom content view/template:
<div class="googleMapView googleMapLocation" tal:define="view context/@@maps_googlemaps_view"> <dl metal:use-macro="here/maps_map/macros/markers"> </dl> </div>
Dependencies
Plone 3.3 / 4.x
Credits
Created by Florian Schulze for Jarn AS in 2007.
Parts are based on:
“ATGoogleMaps”:http://takanory.net/plone/develop/atgooglemaps
“qPloneGoogleMaps”:http://projects.quintagroup.com/products/wiki/qPloneGoogleMaps
“geolocation”:http://svn.quintagroup.com/products/geolocation/
Development originally sponsored by
The “Student Services of Bergen, Norway”:http://sib.no
“University of Oxford”:http://medsci.ox.ac.uk (Medical Sciences Division)
Contributors for version 3.0
Maurizio Lupo @sithmel - maurizio.lupo@redomino.com Luca Fabbri @keul - luca@keul.it
Changelog
3.0 (2013-01-25)
Completely refactored js code using Jquery [sithmel]
Updated to Google API v.3 (reverse geocoding, streetview ecc.) [sithmel]
Added autocompletion for places [sithmel]
Fixed Layer feature (based on keywords) [sithmel]
added search to map view [sithmel]
Added Italian Translation [sithmel]
added new plone collection compatibility [sithmel]
new control panel [sithmel]
various bugfixes and compatibility tests [keul]
2.1.2 - Unreleased
Update for Plone 4.1: include Products.CMFCore to define missing permissions. Fix undefined name showContents in default view. [thefunny42]
Add “Add permission” for Site Administrator too. [thefunny42]
Add controlpanel option to turn off displaying full item contents in pop-up. (http://plone.org/products/maps/issues/34) [khink]
2.1.1 - 2011-05-13
Force validator registration before use. Avoids spurious warning. [ggozad]
Kicked out qPloneGoogleMaps and Products.geolocation [ggozad]
Fixed broken TestCase. [ggozad]
Updated control panel actions for Plone 4. [ggozad]
Update ILocation interface. Custom content type must implement getMarkerIcon method to successfully support LocationMarker adapter. [naro]
Added notes about implementation geolocation field to custom content type. [naro]
Allow maps_map to be used as view template without being the default view (http://plone.org/products/maps/issues/32) [khink]
Replace __init__ profile initialization with xml file GS profile setup, so we can add Products.Maps as a dependency in another product’s Generic Setup profile. [khink]
Added Dutch translation [kcleong]
2.1.0 - 2010-09-19
Update documentation to require Plone 4.x. [hannosch]
Update license to GPL version 2 only. [hannosch]
Removed IndexIterator since it was removed in Plone 4.0. [pbauer]
Added support missing plone domain on i18n directory. Added Spanish translation. Updated full support for i18n and generate new template. [macagua]
Improve map initialization when the location field is displayed in an other schemata. Merged from branches/map-in-another-schemata. Notes: Width and height must be define in the theme’s styles, if you put the field in an other schemata:
div.googleMapEdit { width:756px; /* must be in pixels */ height:455px; /* must be in pixels */ padding-bottom:30px; }
[sylvainb, toutpt]
2.0.3 - 2010-05-07
Added missing i18n_domain to the configure.zcml. [hannosch]
Cook javascript resources after control panel submissions. [silviot]
2.0.2 - 2010-02-10
Added an add permission for GeoLocations to support fine grained control of where the content type can be added. [rossp]
2.0.1 - 2010-01-19
Updated LocationFieldValidator to be compatible with both Plone 3 and 4. [hannosch]
2.0 - 2008-09-17
Add a metadata.xml to the GenericSetup profile. [wichert]
Refactored to make it easier to use Maps in custom content types. If you write a content type and use a field named ‘geolocation’, then you can use default implementations of adapters now instead of writing three on your own. [fschulze]
Moved to common egg file layout. This means there will be no more tarball releases, because the docs are outside of the Products folder. [fschulze]
Converted HISTORY.txt and README.txt to reStructureText. [fschulze]
Added a simple buildout configuration to the package, to be able to develop and test it on its own. [hannosch]
1.2 - July 3, 2008
Added greek translation. [ggozad]
Updated templates for Plone 3.0. [fschulze]
Dropped compatibility with Plone 2.5. [fschulze]
1.1 - September 05, 2007
Fixed the logic when to show layers. [fschulze]
Fixed viewing of maps if the workflow state was ‘private’. There is a new interface and view which only has the ‘enabled’ attribute and which is accessible without restriction. This is now used as the condition in portal_javascripts. [fschulze]
The coordinates field now uses a tuple with two floats everywhere. The widget for it now uses two input fields. [fschulze]
Made LinguaPlone aware. [fschulze]
Added custom view for locations. The map is smaller at the upper right and the rich text is shown besides it. [fschulze]
1.1rc1 - May 17, 2007
Added configlet for Plone 3.0. [fschulze]
Fixed scrolling of map when clicking on pin. This only happend when there were no layers. [fschulze]
Fixed functionality of layer checkboxes for IE6/7. [fschulze]
Fixed key lookup when the URL has a trailing slash. [fschulze]
Added fallback to Google AJAX Search if the Google Maps geocoding did not return any results. This allows you to search for cities i.e. the UK and China. [fschulze]
1.0 - May 03, 2007
Changed the markup. All markers are in one definition list instead of one marker in one list. A dt with class=”title” marks the beginning of a new marker. [fschulze]
Added support for layers. The default is to take keywords as the name of the layer in which a marker is visible. Then you get a map control with checkboxes for each keyword and you can view/hide the markers with that. [fschulze]
Using GenericSetup for installation. [fschulze]
Added support for existing qPloneGoogleMaps markers. Added support of content with location from the geolocation product. [fschulze]
Added RichText field to Location objects. [fschulze]
Added support for tabbed info windows. [fschulze]
0.5 - April 02, 2007
Initial public release. [fschulze]
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.