web/views/igeocodable.py
changeset 3377 dd9d292b6a6d
parent 3163 edfe43ceaa35
child 3451 6b46d73823f5
--- a/web/views/igeocodable.py	Wed Sep 23 08:42:52 2009 +0200
+++ b/web/views/igeocodable.py	Wed Sep 23 09:29:39 2009 +0200
@@ -14,13 +14,13 @@
 from cubicweb.selectors import implements
 
 class GeocodingJsonView(EntityView):
-    id = 'geocoding-json'
+    __regid__ = 'geocoding-json'
+    __select__ = implements(IGeocodable)
+
     binary = True
     templatable = False
     content_type = 'application/json'
 
-    __select__ = implements(IGeocodable)
-
     def call(self):
         # remove entities that don't define latitude and longitude
         self.rset = self.rset.filtered_rset(lambda e: e.latitude and e.longitude)
@@ -57,8 +57,7 @@
 
 
 class GoogleMapBubbleView(EntityView):
-    id = 'gmap-bubble'
-
+    __regid__ = 'gmap-bubble'
     __select__ = implements(IGeocodable)
 
     def cell_call(self, row, col):
@@ -68,9 +67,9 @@
 
 
 class GoogleMapsView(EntityView):
-    id = 'gmap-view'
+    __regid__ = 'gmap-view'
+    __select__ = implements(IGeocodable)
 
-    __select__ = implements(IGeocodable)
     need_navigation = False
 
     def call(self, gmap_key, width=400, height=400, uselabel=True, urlparams=None):
@@ -91,7 +90,7 @@
 
 
 class GoogeMapsLegend(EntityView):
-    id = 'gmap-legend'
+    __regid__ = 'gmap-legend'
 
     def call(self):
         self.w(u'<ol>')