Changeset 348
- Timestamp:
- 09/28/06 17:52:27 (2 years ago)
- Files:
-
- GeographicEntityLite/trunk/GeographicEntityLite/adapters/__init__.py (modified) (1 diff)
- GeographicEntityLite/trunk/GeographicEntityLite/adapters/simple.py (modified) (2 diffs)
- GeographicEntityLite/trunk/GeographicEntityLite/configure.zcml (modified) (1 diff)
- GeographicEntityLite/trunk/GeographicEntityLite/skins/GeographicEntityLite/geographicentitylite_view.pt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
GeographicEntityLite/trunk/GeographicEntityLite/adapters/__init__.py
r321 r348 28 28 # =========================================================================== 29 29 30 from simple import GeoEntitySimple 30 from simple import GeoEntitySimple, GeoCollectionSimple 31 31 GeographicEntityLite/trunk/GeographicEntityLite/adapters/simple.py
r331 r348 30 30 from zope.interface import implements 31 31 32 from Products.PleiadesGeocoder.interfaces import IGeoItemSimple 32 from Products.PleiadesGeocoder.interfaces import IGeoItemSimple \ 33 , IGeoCollectionSimple 33 34 34 35 class GeoEntitySimple(object): … … 101 102 return info 102 103 104 105 class GeoCollectionSimple(object): 106 107 """Adapter for Folderish collections of GeoItemSimple. 108 """ 109 implements(IGeoCollectionSimple) 110 111 def __init__(self, context): 112 """Initialize.""" 113 self.context = context 114 115 def geoItems(self): 116 try: 117 item = IGeoItemSimple(self.context) 118 assert(item.isGeoreferenced()) 119 return [item] 120 except: 121 return [] 122 123 def getItemsInfo(self): 124 infos = [] 125 for item in self.geoItems(): 126 infos.append(item.getInfo()) 127 return infos 128 129 def getBoundingBox(self): 130 raise NotImplementedError 131 GeographicEntityLite/trunk/GeographicEntityLite/configure.zcml
r321 r348 10 10 /> 11 11 12 <adapter 13 for=".interfaces.IGeoEntityLite" 14 provides="Products.PleiadesGeocoder.interfaces.IGeoCollectionSimple" 15 factory=".adapters.GeoCollectionSimple" 16 /> 17 12 18 <five:implements 13 19 class=".content.GeographicEntityLite.GeographicEntityLite" GeographicEntityLite/trunk/GeographicEntityLite/skins/GeographicEntityLite/geographicentitylite_view.pt
r345 r348 28 28 <script 29 29 tal:define="mapcontext python:query_results[0].getObject(); 30 feature_json string:${context/ JSON};31 map_json string:${mapcontext/ JSON};"30 feature_json string:${context/json}; 31 map_json string:${mapcontext/json};" 32 32 defer="defer" 33 33 type="text/javascript"
