X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fgooglemap%2Fgooglemap.py;h=d6ea883ad1e89e7b5b36bd12944001bce5506b25;hb=f2cd8cf9eeefd7c1d546ee41d7862ee9016a20c4;hp=ac2c7982880f84ab6ae7993babc2ea3194f0837b;hpb=946bd11b9c26049833e274498fbf21feb3e6235c;p=myslice.git diff --git a/plugins/googlemap/googlemap.py b/plugins/googlemap/googlemap.py index ac2c7982..d6ea883a 100644 --- a/plugins/googlemap/googlemap.py +++ b/plugins/googlemap/googlemap.py @@ -5,9 +5,13 @@ class GoogleMap (Plugin): # set checkboxes if a final column with checkboxes is desired # pass columns as the initial set of columns # if None then this is taken from the query's fields - def __init__ (self, query, **settings): + # latitude,longitude, zoom : the starting point + def __init__ (self, query, latitude=43., longitude=7., zoom=4, **settings): Plugin.__init__ (self, **settings) self.query=query + self.latitude=latitude + self.longitude=longitude + self.zoom=zoom def template_file (self): return "googlemap.html" @@ -31,4 +35,4 @@ class GoogleMap (Plugin): return reqs # the list of things passed to the js plugin - def json_settings_list (self): return ['plugin_uuid','query_uuid'] + def json_settings_list (self): return ['plugin_uuid','query_uuid', 'latitude', 'longitude', 'zoom', ]