[Checkins] SVN: keas.googlemap/tags/0.5.1/
Dan Korostelev
nadako at gmail.com
Fri Nov 7 05:14:31 EST 2008
Log message for revision 92829:
Changed:
A keas.googlemap/tags/0.5.1/
D keas.googlemap/tags/0.5.1/CHANGES.txt
A keas.googlemap/tags/0.5.1/CHANGES.txt
U keas.googlemap/tags/0.5.1/setup.py
D keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/README.txt
A keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/README.txt
D keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/__init__.py
A keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/__init__.py
D keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/interfaces.py
A keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/interfaces.py
D keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/keas.googlemap.js
A keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/keas.googlemap.js
D keas.googlemap/tags/0.5.1/src/keas/googlemap/demo/browser.py
A keas.googlemap/tags/0.5.1/src/keas/googlemap/demo/browser.py
D keas.googlemap/tags/0.5.1/src/keas/googlemap/demo/markers.pt
A keas.googlemap/tags/0.5.1/src/keas/googlemap/demo/markers.pt
D keas.googlemap/tags/0.5.1/src/keas/googlemap/demo/template.pt
A keas.googlemap/tags/0.5.1/src/keas/googlemap/demo/template.pt
-=-
Copied: keas.googlemap/tags/0.5.1 (from rev 92824, keas.googlemap/trunk)
Deleted: keas.googlemap/tags/0.5.1/CHANGES.txt
===================================================================
--- keas.googlemap/trunk/CHANGES.txt 2008-11-07 00:43:27 UTC (rev 92824)
+++ keas.googlemap/tags/0.5.1/CHANGES.txt 2008-11-07 10:14:30 UTC (rev 92829)
@@ -1,37 +0,0 @@
-=======
-CHANGES
-=======
-
-Version 0.5.1 (unreleased)
---------------------------
-
-- Bug: Fix error with non-lating geocode queries.
-
-- Feature: You can now do::
-
- <script
- tal:replace="provider:keas.googlemap.browser.interfaces.IJavaScript"
- />
-
- and magically get all the necessary javascript viewlets to use the
- google map.
-
-- Feature: markers has now a popup_on_load attribute that can be set to True
- to get marker's info window displayed when page is loaded, not only when
- marker is clicked.
-
-Version 0.5.0 (2008-07-28)
---------------------------
-
-- Initial Release
-
-- Look up geocodes (latitude and longitude coordinates) for any
- query string
-
-- Manage Google Map API keys for multiple domains
-
-- Sort geocodes by distance using the haversine function
-
-- Python representation of a google map that will render all the
- necessary javascript to display the map, including geocode
- markers.
Copied: keas.googlemap/tags/0.5.1/CHANGES.txt (from rev 92828, keas.googlemap/trunk/CHANGES.txt)
===================================================================
--- keas.googlemap/tags/0.5.1/CHANGES.txt (rev 0)
+++ keas.googlemap/tags/0.5.1/CHANGES.txt 2008-11-07 10:14:30 UTC (rev 92829)
@@ -0,0 +1,37 @@
+=======
+CHANGES
+=======
+
+Version 0.5.1 (2008-11-07)
+--------------------------
+
+- Bug: Fix error with non-lating geocode queries.
+
+- Feature: You can now do::
+
+ <script
+ tal:replace="provider:keas.googlemap.browser.interfaces.IJavaScript"
+ />
+
+ and magically get all the necessary javascript viewlets to use the
+ google map.
+
+- Feature: marker now has a popupOnLoad attribute that can be set to True
+ to get marker's info window displayed when page is loaded, not only when
+ marker is clicked. Note that only one marker can have popupOnLoad == True.
+
+Version 0.5.0 (2008-07-28)
+--------------------------
+
+- Initial Release
+
+- Look up geocodes (latitude and longitude coordinates) for any
+ query string
+
+- Manage Google Map API keys for multiple domains
+
+- Sort geocodes by distance using the haversine function
+
+- Python representation of a google map that will render all the
+ necessary javascript to display the map, including geocode
+ markers.
Modified: keas.googlemap/tags/0.5.1/setup.py
===================================================================
--- keas.googlemap/trunk/setup.py 2008-11-07 00:43:27 UTC (rev 92824)
+++ keas.googlemap/tags/0.5.1/setup.py 2008-11-07 10:14:30 UTC (rev 92829)
@@ -15,7 +15,7 @@
setup(
name='keas.googlemap',
- version = '0.5.1-dev',
+ version = '0.5.1',
author='Paul Carduner, Keas, Inc., and the Zope Community',
author_email = "zope3-dev at zope.org",
description='Integration of Google Maps with Zope 3',
Deleted: keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/README.txt
===================================================================
--- keas.googlemap/trunk/src/keas/googlemap/browser/README.txt 2008-11-07 00:43:27 UTC (rev 92824)
+++ keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/README.txt 2008-11-07 10:14:30 UTC (rev 92829)
@@ -1,149 +0,0 @@
-Google Map Browser Pages
-========================
-
-keas.googlemap provides minimal functionality for defining a google
-map through python constructs and generating the proper javascript for
-creating such a google map via the gmaps API.
-
-
-Defining a Google Map
----------------------
-
-Let's start by creating a map definition using the ``GoogleMap`` class.
-
- >>> from keas.googlemap import browser
- >>> from keas.googlemap.browser import interfaces
-
- >>> gmap = browser.GoogleMap()
- >>> from zope.interface.verify import verifyObject
- >>> verifyObject(interfaces.IGoogleMap, gmap)
- True
-
-By default, the map has the following attributes:
-
- >>> gmap.id
- u'google-map'
- >>> gmap.zoom
- 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.
-
- >>> interfaces.NORMAL_MAP
- u'G_NORMAL_MAP'
- >>> interfaces.SATELLITE_MAP
- u'G_SATELLITE_MAP'
- >>> 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
- 400
- >>> gmap.markers
- []
-
-Let's try rendering the javascript needed to create such a map.
-
- >>> print gmap.render()
- <div style="width: 500px; height: 400px" id="google-map">
- Loading Map...
- </div>
- <BLANKLINE>
- <script type="text/javascript">
- var keas_googlemap_maploader = function(){
- keas.googlemap.initialize({id:'google-map',
- zoom:1,
- type:G_NORMAL_MAP,
- controls:["GLargeMapControl", "GMapTypeControl"],
- markers:[]});
- };
- $(document).unload( function() {GUnload();} );
- </script>
- <BLANKLINE>
-
-Adding Markers
---------------
-
- >>> markerHTML = u"""
- ... <h1>My Marker</h1>
- ... <p>This is my marker</p>
- ... """
- >>> from keas.googlemap import geocode
- >>> marker = browser.Marker(geocode=geocode.Geocode(37.231,-23.123),
- ... html=markerHTML)
- >>> marker
- Marker(Geocode(37.231, -23.123), u'\n<h1>My Marker</h1>\n<p>This is my marker</p>\n')
-
-Now we will add this marker to the map and render it again.
-
- >>> gmap.markers.append(marker)
- >>> print gmap.render()
- <div style="width: 500px; height: 400px" id="google-map">
- Loading Map...
- </div>
- <BLANKLINE>
- <script type="text/javascript">
- var keas_googlemap_maploader = function(){
- keas.googlemap.initialize({id:'google-map',
- zoom:1,
- type:G_NORMAL_MAP,
- controls:["GLargeMapControl", "GMapTypeControl"],
- markers:[{"popup_on_load": false, "latitude": 37.2..., "html": "\n<h1>My Marker</h1>\n<p>This is my marker</p>\n", "longitude": -23.1...}]});
- };
- $(document).unload( function() {GUnload();} );
- </script>
- <BLANKLINE>
-
-By default, marker's popup appears when marker is clicked, but we can change it to
-get popup apper on page load. Note that with Google maps, only one popup can be
-visible at the same time.
-
- >>> marker.popup_on_load = True
- >>> print gmap.render()
- <div style="width: 500px; height: 400px" id="google-map">
- Loading Map...
- </div>
- <BLANKLINE>
- <script type="text/javascript">
- var keas_googlemap_maploader = function(){
- keas.googlemap.initialize({id:'google-map',
- zoom:1,
- type:G_NORMAL_MAP,
- controls:["GLargeMapControl", "GMapTypeControl"],
- markers:[{"popup_on_load": true, "latitude": 37.2..., "html": "\n<h1>My Marker</h1>\n<p>This is my marker</p>\n", "longitude": -23.1...}]});
- };
- $(document).unload( function() {GUnload();} );
- </script>
- <BLANKLINE>
-
-To properly display markers, you will need to include the
-markermanager.js utility script from google. There is a viewlet that
-renders the appropriate script tag.
-
- >>> print browser.GoogleMapMarkersViewlet('context','request','view','manager').render()
- <script
- type="text/javascript"
- src="http://gmaps-utility-library.googlecode.com/svn/trunk/markermanager/release/src/markermanager.js"></script>
Copied: keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/README.txt (from rev 92826, keas.googlemap/trunk/src/keas/googlemap/browser/README.txt)
===================================================================
--- keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/README.txt (rev 0)
+++ keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/README.txt 2008-11-07 10:14:30 UTC (rev 92829)
@@ -0,0 +1,165 @@
+Google Map Browser Pages
+========================
+
+keas.googlemap provides minimal functionality for defining a google
+map through python constructs and generating the proper javascript for
+creating such a google map via the gmaps API.
+
+
+Defining a Google Map
+---------------------
+
+Let's start by creating a map definition using the ``GoogleMap`` class.
+
+ >>> from keas.googlemap import browser
+ >>> from keas.googlemap.browser import interfaces
+
+ >>> gmap = browser.GoogleMap()
+ >>> from zope.interface.verify import verifyObject
+ >>> verifyObject(interfaces.IGoogleMap, gmap)
+ True
+
+By default, the map has the following attributes:
+
+ >>> gmap.id
+ u'google-map'
+ >>> gmap.zoom
+ 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.
+
+ >>> interfaces.NORMAL_MAP
+ u'G_NORMAL_MAP'
+ >>> interfaces.SATELLITE_MAP
+ u'G_SATELLITE_MAP'
+ >>> 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
+ 400
+ >>> gmap.markers
+ []
+
+Let's try rendering the javascript needed to create such a map.
+
+ >>> print gmap.render()
+ <div style="width: 500px; height: 400px" id="google-map">
+ Loading Map...
+ </div>
+ <BLANKLINE>
+ <script type="text/javascript">
+ var keas_googlemap_maploader = function(){
+ keas.googlemap.initialize({id:'google-map',
+ zoom:1,
+ type:G_NORMAL_MAP,
+ controls:["GLargeMapControl", "GMapTypeControl"],
+ popup_marker:null,
+ markers:[]});
+ };
+ $(document).unload( function() {GUnload();} );
+ </script>
+ <BLANKLINE>
+
+Adding Markers
+--------------
+
+ >>> markerHTML = u"""
+ ... <h1>My Marker</h1>
+ ... <p>This is my marker</p>
+ ... """
+ >>> from keas.googlemap import geocode
+ >>> marker = browser.Marker(geocode=geocode.Geocode(37.231,-23.123),
+ ... html=markerHTML)
+ >>> marker
+ Marker(Geocode(37.231, -23.123), u'\n<h1>My Marker</h1>\n<p>This is my marker</p>\n')
+
+Now we will add this marker to the map and render it again.
+
+ >>> gmap.markers.append(marker)
+ >>> print gmap.render()
+ <div style="width: 500px; height: 400px" id="google-map">
+ Loading Map...
+ </div>
+ <BLANKLINE>
+ <script type="text/javascript">
+ var keas_googlemap_maploader = function(){
+ keas.googlemap.initialize({id:'google-map',
+ zoom:1,
+ type:G_NORMAL_MAP,
+ controls:["GLargeMapControl", "GMapTypeControl"],
+ popup_marker:null,
+ markers:[{"latitude": 37.2..., "html": "\n<h1>My Marker</h1>\n<p>This is my marker</p>\n", "longitude": -23.1...}]});
+ };
+ $(document).unload( function() {GUnload();} );
+ </script>
+ <BLANKLINE>
+
+By default, marker's popup appears when marker is clicked, but we can change it to
+get popup apper on page load. Note that with Google maps, only one popup can be
+visible at the same time.
+
+ >>> marker.popupOnLoad = True
+ >>> print gmap.render()
+ <div style="width: 500px; height: 400px" id="google-map">
+ Loading Map...
+ </div>
+ <BLANKLINE>
+ <script type="text/javascript">
+ var keas_googlemap_maploader = function(){
+ keas.googlemap.initialize({id:'google-map',
+ zoom:1,
+ type:G_NORMAL_MAP,
+ controls:["GLargeMapControl", "GMapTypeControl"],
+ popup_marker:0,
+ markers:[{"latitude": 37.2..., "html": "\n<h1>My Marker</h1>\n<p>This is my marker</p>\n", "longitude": -23.1...}]});
+ };
+ $(document).unload( function() {GUnload();} );
+ </script>
+ <BLANKLINE>
+
+If we'll try to add one more marker with popupOnLoad == True, the map's ``render``
+method will raise a ValueError:
+
+ >>> marker = browser.Marker(geocode=geocode.Geocode(37.231,-23.123),
+ ... html=u'Test',
+ ... popupOnLoad=True)
+
+ >>> gmap.markers.append(marker)
+ >>> print gmap.render()
+ Traceback (most recent call last):
+ ...
+ ValueError: Only one marker can have popup on load at the same time
+
+To properly display markers, you will need to include the
+markermanager.js utility script from google. There is a viewlet that
+renders the appropriate script tag.
+
+ >>> print browser.GoogleMapMarkersViewlet('context','request','view','manager').render()
+ <script
+ type="text/javascript"
+ src="http://gmaps-utility-library.googlecode.com/svn/trunk/markermanager/release/src/markermanager.js"></script>
Deleted: keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/__init__.py
===================================================================
--- keas.googlemap/trunk/src/keas/googlemap/browser/__init__.py 2008-11-07 00:43:27 UTC (rev 92824)
+++ keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/__init__.py 2008-11-07 10:14:30 UTC (rev 92829)
@@ -1,123 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Foundation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""Keas Google Map Browser Views.
-
-$Id$
-"""
-
-import zope.interface
-import zope.component
-from zope.pagetemplate.pagetemplatefile import PageTemplateFile
-from zope.publisher.browser import BrowserView
-from zope.publisher.interfaces.browser import IBrowserRequest
-from zope.schema.fieldproperty import FieldProperty
-from zope.viewlet.viewlet import JavaScriptViewlet
-from zope.viewlet.viewlet import ViewletBase
-
-from keas.googlemap.geocode import Geocode
-from keas.googlemap.browser import interfaces
-from keas.googlemap import jsoncompat as json
-
-
-class IGoogleMapBrowserLayer(IBrowserRequest):
- """GoogleMap Browser Layer."""
-
-
-GoogleMapJavaScriptViewlet = JavaScriptViewlet('keas.googlemap.js')
-GoogleMapMarkersViewletLocal = JavaScriptViewlet('markermanager.js')
-
-class GoogleMapMarkersViewlet(ViewletBase):
-
- def render(self):
- return ('<script type="text/javascript" '
- 'src="http://gmaps-utility-library.googlecode.com'
- '/svn/trunk/markermanager/release/src/markermanager.js">'
- '</script>')
-
-
-class Marker(object):
- """Implementation of ``keas.googlemap.browser.interfaces.IMarker``."""
- zope.interface.implements(interfaces.IMarker)
-
- geocode = FieldProperty(interfaces.IMarker['geocode'])
- html = FieldProperty(interfaces.IMarker['html'])
- popup_on_load = FieldProperty(interfaces.IMarker['popup_on_load'])
-
- def __init__(self, geocode=None, html=u'', popup_on_load=False):
- self.geocode = geocode or Geocode()
- self.html = html
- self.popup_on_load = popup_on_load
-
- def __repr__(self):
- return '%s(%r, %r)' % (self.__class__.__name__,
- self.geocode,
- self.html)
-
-
-class GoogleMap(object):
- """Implementation of ``keas.googlemap.browser.interfaces.IGoogleMap``."""
-
- zope.interface.implements(interfaces.IGoogleMap)
-
- template = PageTemplateFile("google-map.pt")
- 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'])
-
- @property
- def style(self):
- return u"width: %spx; height: %spx" % (self.width, self.height)
-
- def __init__(self, **kwargs):
- for key, value in kwargs.items():
- setattr(self, key, value)
- self.context = self.request = None
-
- def update(self):
- pass
-
- def render(self):
- return self.template(view=self)
-
- def javascript(self):
- markerString = json.encode(
- [dict(latitude=marker.geocode.latitude,
- longitude=marker.geocode.longitude,
- html=marker.html,
- popup_on_load=marker.popup_on_load)
- for marker in self.markers])
- return """
- var keas_googlemap_maploader = function(){
- keas.googlemap.initialize({id:'%(id)s',
- zoom:%(zoom)s,
- type:%(type)s,
- controls:%(controls)s,
- markers:%(markers)s});
- };
- $(document).unload( function() {GUnload();} );
- """ % dict(id=self.id,
- zoom=self.zoom,
- type=self.type,
- controls=json.encode(self.controls),
- markers=markerString)
-
-class GoogleMapBrowserView(BrowserView, GoogleMap):
-
- def __init__(self, context, request, **kwargs):
- BrowserView.__init__(self, context, request)
- GoogleMap.__init__(self, **kwargs)
Copied: keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/__init__.py (from rev 92826, keas.googlemap/trunk/src/keas/googlemap/browser/__init__.py)
===================================================================
--- keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/__init__.py (rev 0)
+++ keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/__init__.py 2008-11-07 10:14:30 UTC (rev 92829)
@@ -0,0 +1,131 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Keas Google Map Browser Views.
+
+$Id$
+"""
+
+import zope.interface
+import zope.component
+from zope.pagetemplate.pagetemplatefile import PageTemplateFile
+from zope.publisher.browser import BrowserView
+from zope.publisher.interfaces.browser import IBrowserRequest
+from zope.schema.fieldproperty import FieldProperty
+from zope.viewlet.viewlet import JavaScriptViewlet
+from zope.viewlet.viewlet import ViewletBase
+
+from keas.googlemap.geocode import Geocode
+from keas.googlemap.browser import interfaces
+from keas.googlemap import jsoncompat as json
+
+
+class IGoogleMapBrowserLayer(IBrowserRequest):
+ """GoogleMap Browser Layer."""
+
+
+GoogleMapJavaScriptViewlet = JavaScriptViewlet('keas.googlemap.js')
+GoogleMapMarkersViewletLocal = JavaScriptViewlet('markermanager.js')
+
+class GoogleMapMarkersViewlet(ViewletBase):
+
+ def render(self):
+ return ('<script type="text/javascript" '
+ 'src="http://gmaps-utility-library.googlecode.com'
+ '/svn/trunk/markermanager/release/src/markermanager.js">'
+ '</script>')
+
+
+class Marker(object):
+ """Implementation of ``keas.googlemap.browser.interfaces.IMarker``."""
+ zope.interface.implements(interfaces.IMarker)
+
+ geocode = FieldProperty(interfaces.IMarker['geocode'])
+ html = FieldProperty(interfaces.IMarker['html'])
+ popupOnLoad = FieldProperty(interfaces.IMarker['popupOnLoad'])
+
+ def __init__(self, geocode=None, html=u'', popupOnLoad=False):
+ self.geocode = geocode or Geocode()
+ self.html = html
+ self.popupOnLoad = popupOnLoad
+
+ def __repr__(self):
+ return '%s(%r, %r)' % (self.__class__.__name__,
+ self.geocode,
+ self.html)
+
+
+class GoogleMap(object):
+ """Implementation of ``keas.googlemap.browser.interfaces.IGoogleMap``."""
+
+ zope.interface.implements(interfaces.IGoogleMap)
+
+ template = PageTemplateFile("google-map.pt")
+ 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'])
+
+ @property
+ def style(self):
+ return u"width: %spx; height: %spx" % (self.width, self.height)
+
+ def __init__(self, **kwargs):
+ for key, value in kwargs.items():
+ setattr(self, key, value)
+ self.context = self.request = None
+
+ def update(self):
+ pass
+
+ def render(self):
+ return self.template(view=self)
+
+ def javascript(self):
+ markers = []
+ popup_marker = None
+ for i, marker in enumerate(self.markers):
+ if marker.popupOnLoad:
+ if popup_marker is not None:
+ raise ValueError('Only one marker can have popup on load at the same time')
+ else:
+ popup_marker = i
+ markers.append(dict(latitude=marker.geocode.latitude,
+ longitude=marker.geocode.longitude,
+ html=marker.html))
+ markerString = json.encode(markers)
+ return """
+ var keas_googlemap_maploader = function(){
+ keas.googlemap.initialize({id:'%(id)s',
+ zoom:%(zoom)s,
+ type:%(type)s,
+ controls:%(controls)s,
+ popup_marker:%(popup_marker)s,
+ markers:%(markers)s});
+ };
+ $(document).unload( function() {GUnload();} );
+ """ % dict(id=self.id,
+ zoom=self.zoom,
+ type=self.type,
+ controls=json.encode(self.controls),
+ popup_marker=json.encode(popup_marker),
+ markers=markerString)
+
+class GoogleMapBrowserView(BrowserView, GoogleMap):
+
+ def __init__(self, context, request, **kwargs):
+ BrowserView.__init__(self, context, request)
+ GoogleMap.__init__(self, **kwargs)
Deleted: keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/interfaces.py
===================================================================
--- keas.googlemap/trunk/src/keas/googlemap/browser/interfaces.py 2008-11-07 00:43:27 UTC (rev 92824)
+++ keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/interfaces.py 2008-11-07 10:14:30 UTC (rev 92829)
@@ -1,106 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Foundation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""Keas Google Map Interfaces.
-
-$Id$
-"""
-import zope.interface
-import zope.schema
-from zope.viewlet.interfaces import IViewletManager
-
-from keas.googlemap.interfaces import IGeocode
-
-NORMAL_MAP = u'G_NORMAL_MAP'
-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."""
-
-
-class IGoogleMap(zope.interface.Interface):
- """An Interface for static google maps."""
-
- id = zope.schema.TextLine(
- title=u"ID for the google map html tag",
- required=True,
- default=u'google-map')
-
- zoom = zope.schema.Choice(
- title=u"Zoom",
- default=1,
- values=range(20),
- required=True)
-
- type = zope.schema.Choice(
- title=u"Type",
- values=(NORMAL_MAP, SATELLITE_MAP, HYBRID_MAP),
- 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=[],
- required=True)
-
- width = zope.schema.Int(
- title=u'Width in px',
- default=500,
- required=True)
-
- height = zope.schema.Int(
- title=u'Height in px',
- default=400,
- required=True)
-
-
-class IMarker(zope.interface.Interface):
- """An interface for a map marker."""
-
- geocode = zope.schema.Object(
- title=u'Geocode',
- schema=IGeocode,
- required=True)
-
- html = zope.schema.Text(
- title=u'HTML',
- description=u'HTML that goes inside the marker popup.',
- required=False)
-
- popup_on_load = zope.schema.Bool(
- title=u"Popup on load",
- description=u"Show marker popup when page is loaded",
- default=False,
- required=True)
Copied: keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/interfaces.py (from rev 92825, keas.googlemap/trunk/src/keas/googlemap/browser/interfaces.py)
===================================================================
--- keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/interfaces.py (rev 0)
+++ keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/interfaces.py 2008-11-07 10:14:30 UTC (rev 92829)
@@ -0,0 +1,106 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Keas Google Map Interfaces.
+
+$Id$
+"""
+import zope.interface
+import zope.schema
+from zope.viewlet.interfaces import IViewletManager
+
+from keas.googlemap.interfaces import IGeocode
+
+NORMAL_MAP = u'G_NORMAL_MAP'
+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."""
+
+
+class IGoogleMap(zope.interface.Interface):
+ """An Interface for static google maps."""
+
+ id = zope.schema.TextLine(
+ title=u"ID for the google map html tag",
+ required=True,
+ default=u'google-map')
+
+ zoom = zope.schema.Choice(
+ title=u"Zoom",
+ default=1,
+ values=range(20),
+ required=True)
+
+ type = zope.schema.Choice(
+ title=u"Type",
+ values=(NORMAL_MAP, SATELLITE_MAP, HYBRID_MAP),
+ 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=[],
+ required=True)
+
+ width = zope.schema.Int(
+ title=u'Width in px',
+ default=500,
+ required=True)
+
+ height = zope.schema.Int(
+ title=u'Height in px',
+ default=400,
+ required=True)
+
+
+class IMarker(zope.interface.Interface):
+ """An interface for a map marker."""
+
+ geocode = zope.schema.Object(
+ title=u'Geocode',
+ schema=IGeocode,
+ required=True)
+
+ html = zope.schema.Text(
+ title=u'HTML',
+ description=u'HTML that goes inside the marker popup.',
+ required=False)
+
+ popupOnLoad = zope.schema.Bool(
+ title=u"Popup on load",
+ description=u"Show marker popup when page is loaded",
+ default=False,
+ required=True)
Deleted: keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/keas.googlemap.js
===================================================================
--- keas.googlemap/trunk/src/keas/googlemap/browser/keas.googlemap.js 2008-11-07 00:43:27 UTC (rev 92824)
+++ keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/keas.googlemap.js 2008-11-07 10:14:30 UTC (rev 92829)
@@ -1,54 +0,0 @@
-var keas = keas || {};
-keas.googlemap = {
- initialize: function(config){
- /*config is of the form
- {id: "some-dom-element-id",
- zoom: 12, //the desired zoom level,
- type: G_NORMAL_MAP, //a google maps map type string.
- controls: ['GLargeMapControl'],
- markers: [{latitude: 3.1234,
- longitude: 4.52342,
- html: "stuff that appears in the window",
- popup_on_mode: false}]} //an array of markers.
- */
- if (GBrowserIsCompatible()) {
- var center;
- if (config.markers.length > 0){
- center = new GLatLng(config.markers[0].latitude,
- config.markers[0].longitude);
- }
- else {
- center = new GLatLng(0.0, 0.0);
- }
- var map = new GMap2(document.getElementById(config.id));
-
- for (var i=0; i<config.controls.length; i++){
- map.addControl(eval("(new "+config.controls[i]+"())"));
- }
- map.setCenter(center, config.zoom, config.type);
- var bounds = map.getBounds();
- var mgr = new MarkerManager(map);
- var markers = [];
- for (var i=0; i < config.markers.length; i++){
- var conf = config.markers[i];
- var marker = new GMarker(new GLatLng(conf.latitude, conf.longitude));
- marker.bindInfoWindowHtml(conf.html);
- markers.push(marker);
- bounds.extend(marker.getPoint());
- }
-
- mgr.addMarkers(markers, 0);
- map.setZoom(map.getBoundsZoomLevel(bounds));
- map.setCenter(bounds.getCenter());
-
- mgr.refresh();
-
- for (var i=0; i < markers.length; i++){
- var conf = config.markers[i];
- if (conf.popup_on_load)
- markers[i].openInfoWindowHtml(conf.html);
- }
-
- }
- }
-};
\ No newline at end of file
Copied: keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/keas.googlemap.js (from rev 92826, keas.googlemap/trunk/src/keas/googlemap/browser/keas.googlemap.js)
===================================================================
--- keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/keas.googlemap.js (rev 0)
+++ keas.googlemap/tags/0.5.1/src/keas/googlemap/browser/keas.googlemap.js 2008-11-07 10:14:30 UTC (rev 92829)
@@ -0,0 +1,54 @@
+var keas = keas || {};
+keas.googlemap = {
+ initialize: function(config){
+ /*config is of the form
+ {id: "some-dom-element-id",
+ zoom: 12, //the desired zoom level,
+ type: G_NORMAL_MAP, //a google maps map type string.
+ controls: ['GLargeMapControl'],
+ popup_marker: null, // number of the marker with popup or null
+ markers: [{latitude: 3.1234,
+ longitude: 4.52342,
+ html: "stuff that appears in the window",
+ popup_on_mode: false}]} //an array of markers.
+ */
+ if (GBrowserIsCompatible()) {
+ var center;
+ if (config.markers.length > 0){
+ center = new GLatLng(config.markers[0].latitude,
+ config.markers[0].longitude);
+ }
+ else {
+ center = new GLatLng(0.0, 0.0);
+ }
+ var map = new GMap2(document.getElementById(config.id));
+
+ for (var i=0; i<config.controls.length; i++){
+ map.addControl(eval("(new "+config.controls[i]+"())"));
+ }
+ map.setCenter(center, config.zoom, config.type);
+ var bounds = map.getBounds();
+ var mgr = new MarkerManager(map);
+ var markers = [];
+ for (var i=0; i < config.markers.length; i++){
+ var conf = config.markers[i];
+ var marker = new GMarker(new GLatLng(conf.latitude, conf.longitude));
+ marker.bindInfoWindowHtml(conf.html);
+ markers.push(marker);
+ bounds.extend(marker.getPoint());
+ }
+
+ mgr.addMarkers(markers, 0);
+ map.setZoom(map.getBoundsZoomLevel(bounds));
+ map.setCenter(bounds.getCenter());
+
+ mgr.refresh();
+
+ if (config.popup_marker != null) {
+ var i = config.popup_marker;
+ markers[i].openInfoWindowHtml(config.markers[i].html)
+ }
+
+ }
+ }
+};
\ No newline at end of file
Deleted: keas.googlemap/tags/0.5.1/src/keas/googlemap/demo/browser.py
===================================================================
--- keas.googlemap/trunk/src/keas/googlemap/demo/browser.py 2008-11-07 00:43:27 UTC (rev 92824)
+++ keas.googlemap/tags/0.5.1/src/keas/googlemap/demo/browser.py 2008-11-07 10:14:30 UTC (rev 92829)
@@ -1,131 +0,0 @@
-import zope.component
-import zope.interface
-import zope.schema
-from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
-from zope.viewlet.interfaces import IViewletManager
-from zope.session.interfaces import ISession
-
-from zope.schema import vocabulary
-from z3c.formui import layout
-from z3c.formui.interfaces import ICSS as ICSSFormUI
-from z3c.form import button, field, form, group, widget
-
-from keas.googlemap.interfaces import IGeocodeQuery, IGeocode, ICenteredGeocodes
-from keas.googlemap import geocode
-from keas.googlemap.browser import interfaces, GoogleMap, Marker
-
-
-class IJavaScript(IViewletManager):
- """JavaScript viewlet manager."""
-
-class ICSS(ICSSFormUI):
- """CSS viewlet manager."""
-
-SESSION_KEY = 'keas.googlemap.demo'
-
-class SessionProperty(object):
-
- def __init__(self, name, default=None):
- self.name = name
- self.default = default
-
- def __get__(self, inst, klass):
- session = ISession(inst.request)[SESSION_KEY]
- return session.get(self.name, self.default)
-
- def __set__(self, inst, value):
- session = ISession(inst.request)[SESSION_KEY]
- session[self.name] = value
-
-
-class GeocodeQueryForm(form.EditForm):
- label = u'Geocode Query'
- fields = field.Fields(IGeocodeQuery)
- prefix = 'geocode'
-
- success = False
- _query = SessionProperty('query')
- def getContent(self):
- if self._query is None:
- self._query = geocode.GeocodeQuery(u'1600 Pennsylvania Ave, Washington D.C.')
- return self._query
-
- @button.buttonAndHandler(u'Submit')
- def submit(self, action):
- self.handleApply(self, action)
- try:
- self.status = "Found %s" % IGeocode(self.getContent())
- self.success = True
- except ValueError, e:
- self.status = str(e)
- return
-
-
-class MarkersForm(form.AddForm):
- form.extends(form.AddForm)
- label = u"Map Markers"
-
- template = ViewPageTemplateFile("markers.pt")
-
- ignoreContext = True
- fields = field.Fields(interfaces.IMarker).select('html', 'popup_on_load')
- fields+= field.Fields(zope.schema.TextLine(
- title=u'Query',
- __name__='query',
- required=True))
- markers = SessionProperty('markers')
-
- def __init__(self, context, request):
- super(MarkersForm, self).__init__(context, request)
- if self.markers is None:
- self.markers = []
-
- def create(self, data):
- query = geocode.GeocodeQuery(data['query'])
- marker = Marker(geocode=IGeocode(query),
- html=data['html'],
- popup_on_load=data['popup_on_load'])
- return marker
-
- def add(self, obj):
- self.markers.append(obj)
-
- def nextURL(self):
- return '.'
-
- @button.buttonAndHandler(u'Clear Markers')
- def clear(self, action):
- self.markers = []
-
-
-class DemoPage(layout.FormLayoutSupport, group.GroupForm, form.EditForm):
- form.extends(form.EditForm)
- label=u"Google Map Demo"
-
- template = ViewPageTemplateFile("demo.pt")
-
- fields = field.Fields(interfaces.IGoogleMap).select(
- 'zoom','type','width','height','controls')
-
- googleMap = SessionProperty('googleMap')
-
- def __init__(self, context, request):
- super(DemoPage, self).__init__(context, request)
- if self.googleMap is None:
- self.googleMap = GoogleMap(markers=[Marker(geocode.Geocode(3.123,42.231))])
- self.geocodeForm = GeocodeQueryForm(context, request)
- self.markersForm = MarkersForm(context, request)
-
- def update(self):
- super(DemoPage, self).update()
- self.geocodeForm.update()
- self.markersForm.update()
- self.googleMap.markers = self.markersForm.markers
- self.googleMap.update()
-
- def getContent(self):
- return self.googleMap
-
- @button.buttonAndHandler(u'Revert to Defaults')
- def defaults(self, action):
- self.googleMap = GoogleMap(markers=[Marker(geocode.Geocode(3.123,42.231))])
Copied: keas.googlemap/tags/0.5.1/src/keas/googlemap/demo/browser.py (from rev 92827, keas.googlemap/trunk/src/keas/googlemap/demo/browser.py)
===================================================================
--- keas.googlemap/tags/0.5.1/src/keas/googlemap/demo/browser.py (rev 0)
+++ keas.googlemap/tags/0.5.1/src/keas/googlemap/demo/browser.py 2008-11-07 10:14:30 UTC (rev 92829)
@@ -0,0 +1,137 @@
+import zope.component
+import zope.interface
+import zope.schema
+from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
+from zope.viewlet.interfaces import IViewletManager
+from zope.session.interfaces import ISession
+
+from zope.schema import vocabulary
+from z3c.formui import layout
+from z3c.formui.interfaces import ICSS as ICSSFormUI
+from z3c.form import button, field, form, group, widget
+from z3c.form.browser.checkbox import CheckBoxFieldWidget
+
+from keas.googlemap.interfaces import IGeocodeQuery, IGeocode, ICenteredGeocodes
+from keas.googlemap import geocode
+from keas.googlemap.browser import interfaces, GoogleMap, Marker
+
+
+class IJavaScript(IViewletManager):
+ """JavaScript viewlet manager."""
+
+class ICSS(ICSSFormUI):
+ """CSS viewlet manager."""
+
+SESSION_KEY = 'keas.googlemap.demo'
+
+class SessionProperty(object):
+
+ def __init__(self, name, default=None):
+ self.name = name
+ self.default = default
+
+ def __get__(self, inst, klass):
+ session = ISession(inst.request)[SESSION_KEY]
+ return session.get(self.name, self.default)
+
+ def __set__(self, inst, value):
+ session = ISession(inst.request)[SESSION_KEY]
+ session[self.name] = value
+
+
+class GeocodeQueryForm(form.EditForm):
+ label = u'Geocode Query'
+ fields = field.Fields(IGeocodeQuery)
+ prefix = 'geocode'
+
+ success = False
+ _query = SessionProperty('query')
+ def getContent(self):
+ if self._query is None:
+ self._query = geocode.GeocodeQuery(u'1600 Pennsylvania Ave, Washington D.C.')
+ return self._query
+
+ @button.buttonAndHandler(u'Submit')
+ def submit(self, action):
+ self.handleApply(self, action)
+ try:
+ self.status = "Found %s" % IGeocode(self.getContent())
+ self.success = True
+ except ValueError, e:
+ self.status = str(e)
+ return
+
+
+class MarkersForm(form.AddForm):
+ form.extends(form.AddForm)
+ label = u"Map Markers"
+
+ template = ViewPageTemplateFile("markers.pt")
+
+ ignoreContext = True
+ fields = field.Fields(interfaces.IMarker).select('html', 'popupOnLoad')
+ fields+= field.Fields(zope.schema.TextLine(
+ title=u'Query',
+ __name__='query',
+ required=True))
+ markers = SessionProperty('markers')
+
+ def __init__(self, context, request):
+ super(MarkersForm, self).__init__(context, request)
+ if self.markers is None:
+ self.markers = []
+
+ def create(self, data):
+ query = geocode.GeocodeQuery(data['query'])
+ marker = Marker(geocode=IGeocode(query),
+ html=data['html'],
+ popupOnLoad=data['popupOnLoad'])
+ return marker
+
+ def add(self, obj):
+ if obj.popupOnLoad:
+ for marker in self.markers:
+ if marker.popupOnLoad:
+ marker.popupOnLoad = False
+ self.markers.append(obj)
+
+ def nextURL(self):
+ return '.'
+
+ @button.buttonAndHandler(u'Clear Markers')
+ def clear(self, action):
+ self.markers = []
+
+
+class DemoPage(layout.FormLayoutSupport, group.GroupForm, form.EditForm):
+ form.extends(form.EditForm)
+ label=u"Google Map Demo"
+
+ template = ViewPageTemplateFile("demo.pt")
+
+ fields = field.Fields(interfaces.IGoogleMap).select(
+ 'zoom','type','width','height','controls')
+ fields['controls'].widgetFactory = CheckBoxFieldWidget
+
+ googleMap = SessionProperty('googleMap')
+
+ def __init__(self, context, request):
+ super(DemoPage, self).__init__(context, request)
+ if self.googleMap is None:
+ self.googleMap = GoogleMap(markers=[Marker(geocode.Geocode(3.123,42.231))])
+ self.geocodeForm = GeocodeQueryForm(context, request)
+ self.markersForm = MarkersForm(context, request)
+
+ def update(self):
+ super(DemoPage, self).update()
+ self.geocodeForm.update()
+ self.markersForm.update()
+ self.googleMap.markers = self.markersForm.markers
+ self.googleMap.update()
+
+ def getContent(self):
+ return self.googleMap
+
+ @button.buttonAndHandler(u'Revert to Defaults')
+ def defaults(self, action):
+ self.googleMap = GoogleMap(markers=[Marker(geocode.Geocode(3.123,42.231))])
Deleted: keas.googlemap/tags/0.5.1/src/keas/googlemap/demo/markers.pt
===================================================================
--- keas.googlemap/trunk/src/keas/googlemap/demo/markers.pt 2008-11-07 00:43:27 UTC (rev 92824)
+++ keas.googlemap/tags/0.5.1/src/keas/googlemap/demo/markers.pt 2008-11-07 10:14:30 UTC (rev 92829)
@@ -1,9 +0,0 @@
-<div metal:use-macro="macro:form"></div>
-<h2>Markers</h2>
-<div tal:repeat="marker view/markers">
- <span tal:content="marker/geocode/latitude"/>, <span tal:content="marker/geocode/longitude"/><br />
- <div tal:content="structure marker/html">Body</div>
- <div>
- (display on load: <tal:block replace="marker/popup_on_load" />)
- </div>
-</div>
Copied: keas.googlemap/tags/0.5.1/src/keas/googlemap/demo/markers.pt (from rev 92825, keas.googlemap/trunk/src/keas/googlemap/demo/markers.pt)
===================================================================
--- keas.googlemap/tags/0.5.1/src/keas/googlemap/demo/markers.pt (rev 0)
+++ keas.googlemap/tags/0.5.1/src/keas/googlemap/demo/markers.pt 2008-11-07 10:14:30 UTC (rev 92829)
@@ -0,0 +1,9 @@
+<div metal:use-macro="macro:form"></div>
+<h2>Markers</h2>
+<div tal:repeat="marker view/markers">
+ <span tal:content="marker/geocode/latitude"/>, <span tal:content="marker/geocode/longitude"/><br />
+ <div tal:content="structure marker/html">Body</div>
+ <div>
+ (display on load: <tal:block replace="marker/popupOnLoad" />)
+ </div>
+</div>
Deleted: keas.googlemap/tags/0.5.1/src/keas/googlemap/demo/template.pt
===================================================================
--- keas.googlemap/trunk/src/keas/googlemap/demo/template.pt 2008-11-07 00:43:27 UTC (rev 92824)
+++ keas.googlemap/tags/0.5.1/src/keas/googlemap/demo/template.pt 2008-11-07 10:14:30 UTC (rev 92829)
@@ -1,35 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
- metal:define-macro="page">
- <head metal:define-slot="head">
- <title>Keas GooleMap Demo</title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
- <meta http-equiv="cache-control" content="no-cache" />
- <meta http-equiv="pragma" content="no-cache" />
- <script type="text/javascript"
- tal:attributes="src context/++resource++jquery.js">
- </script>
- <style tal:replace="structure provider:ICSS"> </style>
- <style type="text/css">
- body{
- font-size: small;
- font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
- }
- td{
- vertical-align: top;
- }
- h1{
- font-size: large;
- }
- h2{
- font-size: medium;
- }
- </style>
- </head>
-
- <body>
- <div tal:replace="structure provider:pagelet"/>
- </body>
- <script tal:replace="structure provider:IJavaScript"> </script>
-
-</html>
Copied: keas.googlemap/tags/0.5.1/src/keas/googlemap/demo/template.pt (from rev 92827, keas.googlemap/trunk/src/keas/googlemap/demo/template.pt)
===================================================================
--- keas.googlemap/tags/0.5.1/src/keas/googlemap/demo/template.pt (rev 0)
+++ keas.googlemap/tags/0.5.1/src/keas/googlemap/demo/template.pt 2008-11-07 10:14:30 UTC (rev 92829)
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
+ metal:define-macro="page">
+ <head metal:define-slot="head">
+ <title>Keas GooleMap Demo</title>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+ <meta http-equiv="cache-control" content="no-cache" />
+ <meta http-equiv="pragma" content="no-cache" />
+ <script type="text/javascript"
+ tal:attributes="src context/++resource++jquery.js">
+ </script>
+ <style tal:replace="structure provider:ICSS"> </style>
+ <style type="text/css">
+ body{
+ font-size: small;
+ font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
+ }
+ td{
+ vertical-align: top;
+ }
+ h1{
+ font-size: large;
+ }
+ h2{
+ font-size: medium;
+ }
+ #form-widgets-controls-row span.option {
+ display: block;
+ }
+ </style>
+ </head>
+
+ <body>
+ <div tal:replace="structure provider:pagelet"/>
+ </body>
+ <script tal:replace="structure provider:IJavaScript"> </script>
+
+</html>
More information about the Checkins
mailing list