git://git.onelab.eu
/
myslice.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
can pass starting lat/lon/zoom to googlemap
[myslice.git]
/
plugins
/
googlemap
/
googlemap.py
diff --git
a/plugins/googlemap/googlemap.py
b/plugins/googlemap/googlemap.py
index
ac2c798
..
d6ea883
100644
(file)
--- 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
# 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
Plugin.__init__ (self, **settings)
self.query=query
+ self.latitude=latitude
+ self.longitude=longitude
+ self.zoom=zoom
def template_file (self):
return "googlemap.html"
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
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',
]