gmap: fix regression from 151058945234
Send zoomlevel as an int, and move closing brace to the right place.
--- a/web/data/cubicweb.gmap.js Thu Jan 12 13:04:59 2012 +0100
+++ b/web/data/cubicweb.gmap.js Tue Jan 17 11:47:14 2012 +0100
@@ -35,13 +35,13 @@
zoomLevel = geodata.zoomlevel;
} else {
zoomLevel = map.getBoundsZoomLevel( latlngbounds ) - 1;
+ }
if (geodata.center) {
center = new GLatng(geodata.center.latitude, geodata.center.longitude);
} else {
center = latlngbounds.getCenter();
}
map.setCenter(center, zoomLevel);
- }
for (var i = 0; i < geodata.markers.length; i++) {
var marker = geodata.markers[i];
self.createMarker(map, marker, i + 1, uselabel);
--- a/web/views/igeocodable.py Thu Jan 12 13:04:59 2012 +0100
+++ b/web/views/igeocodable.py Tue Jan 17 11:47:14 2012 +0100
@@ -80,7 +80,7 @@
'markers': markers,
}
if zoomlevel:
- geodata['zoomlevel'] = zoomlevel
+ geodata['zoomlevel'] = int(zoomlevel)
self.w(json_dumps(geodata))
def build_marker_data(self, entity, igeocodable, extraparams):