[Checkins] SVN: keas.googlemap/trunk/src/keas/googlemap/browser/ keep track of the different google map control types that are available.
Paul Carduner
paulcarduner at gmail.com
Mon Oct 6 02:56:06 EDT 2008
Log message for revision 91790:
keep track of the different google map control types that are available.
Changed:
U keas.googlemap/trunk/src/keas/googlemap/browser/README.txt
U keas.googlemap/trunk/src/keas/googlemap/browser/__init__.py
U keas.googlemap/trunk/src/keas/googlemap/browser/interfaces.py
-=-
Modified: keas.googlemap/trunk/src/keas/googlemap/browser/README.txt
===================================================================
--- keas.googlemap/trunk/src/keas/googlemap/browser/README.txt 2008-10-06 05:53:51 UTC (rev 91789)
+++ keas.googlemap/trunk/src/keas/googlemap/browser/README.txt 2008-10-06 06:56:05 UTC (rev 91790)
@@ -27,6 +27,8 @@
1
>>> gmap.type
u'G_NORMAL_MAP'
+ >>> gmap.controls
+ ['GLargeMapControl', 'GMapTypeControl']
A quick note about the google map types. There are three types known
to this API, and they are stored in the following global variables.
@@ -38,6 +40,24 @@
>>> interfaces.HYBRID_MAP
u'G_HYBRID_MAP'
+There are also several different typs of controls that can be
+displayed on a map.
+
+ >>> interfaces.GLargeMapControl
+ 'GLargeMapControl'
+ >>> interfaces.GSmallMapControl
+ 'GSmallMapControl'
+ >>> interfaces.GSmallZoomControl
+ 'GSmallZoomControl'
+ >>> interfaces.GScaleControl
+ 'GScaleControl'
+ >>> interfaces.GMapTypeControl
+ 'GMapTypeControl'
+ >>> interfaces.GHierarchicalMapTypeControl
+ 'GHierarchicalMapTypeControl'
+ >>> interfaces.GOverviewMapControl
+ 'GOverviewMapControl'
+
>>> gmap.width
500
>>> gmap.height
Modified: keas.googlemap/trunk/src/keas/googlemap/browser/__init__.py
===================================================================
--- keas.googlemap/trunk/src/keas/googlemap/browser/__init__.py 2008-10-06 05:53:51 UTC (rev 91789)
+++ keas.googlemap/trunk/src/keas/googlemap/browser/__init__.py 2008-10-06 06:56:05 UTC (rev 91790)
@@ -71,6 +71,7 @@
id = FieldProperty(interfaces.IGoogleMap['id'])
zoom = FieldProperty(interfaces.IGoogleMap['zoom'])
type = FieldProperty(interfaces.IGoogleMap['type'])
+ controls = FieldProperty(interfaces.IGoogleMap['controls'])
width = FieldProperty(interfaces.IGoogleMap['width'])
height = FieldProperty(interfaces.IGoogleMap['height'])
markers = FieldProperty(interfaces.IGoogleMap['markers'])
Modified: keas.googlemap/trunk/src/keas/googlemap/browser/interfaces.py
===================================================================
--- keas.googlemap/trunk/src/keas/googlemap/browser/interfaces.py 2008-10-06 05:53:51 UTC (rev 91789)
+++ keas.googlemap/trunk/src/keas/googlemap/browser/interfaces.py 2008-10-06 06:56:05 UTC (rev 91790)
@@ -25,6 +25,14 @@
SATELLITE_MAP = u'G_SATELLITE_MAP'
HYBRID_MAP = u'G_HYBRID_MAP'
+GLargeMapControl = 'GLargeMapControl'
+GSmallMapControl = 'GSmallMapControl'
+GSmallZoomControl = 'GSmallZoomControl'
+GScaleControl = 'GScaleControl'
+GMapTypeControl = 'GMapTypeControl'
+GHierarchicalMapTypeControl = 'GHierarchicalMapTypeControl'
+GOverviewMapControl = 'GOverviewMapControl'
+
class IJavaScript(IViewletManager):
"""Viewlet manager for google map javascript viewlets."""
@@ -49,6 +57,19 @@
default=NORMAL_MAP,
required=True)
+ controls = zope.schema.List(
+ title=u'Controls',
+ value_type=zope.schema.Choice(
+ values=(GLargeMapControl,
+ GSmallMapControl,
+ GSmallZoomControl,
+ GScaleControl,
+ GMapTypeControl,
+ GHierarchicalMapTypeControl,
+ GOverviewMapControl,
+ )),
+ default=[GLargeMapControl,GMapTypeControl])
+
markers = zope.schema.List(
title=u'Markers',
default=[],
More information about the Checkins
mailing list