# googlemap_key : mandatory googlemap API v3 key
# latitude,longitude, zoom : the starting point
# apparently at some point there has been support for a boolean 'checkboxes' input arg but seems dropped
- def __init__ (self, query, googlemap_api_key=None, latitude=43., longitude=7., zoom=4, **settings):
+ def __init__ (self, query, googlemap_api_key=None, latitude=50., longitude=50, zoom=3, **settings):
Plugin.__init__ (self, **settings)
self.query=query
self.googlemap_api_key=googlemap_api_key
on_show: function(e) {
if (debug) messages.debug("googlemap.on_show");
- var googlemap = e.data;
- google.maps.event.trigger(googlemap.map, 'resize');
+ var self = e.data;
+ var center = new google.maps.LatLng(self.options.latitude, self.options.longitude);
+
+ google.maps.event.trigger(self.map, 'resize');
+ self.map.setCenter(center);
},
/**************************************************************************
# the key to use at init-time
init_key = main_query_init_key,
checkboxes = True,
- # center on Paris
- latitude = 49.,
- longitude = 9,
- zoom = 8,
+
+ # To center around Europe : 53,9 / 3
+ latitude = 53.,
+ longitude = 9.,
+ zoom = 3,
)
# --------------------------------------------------------------------------