From: Thierry Parmentelat Date: Wed, 18 Apr 2012 10:43:45 +0000 (+0200) Subject: another ugly hack is gone X-Git-Tag: myplc-5.1-2~5 X-Git-Url: http://git.onelab.eu/?p=myplc.git;a=commitdiff_plain;h=dbf0fc19b34d57bbb2645c03739d326fb07ba8be another ugly hack is gone --- diff --git a/bin/plc-kml.py b/bin/plc-kml.py index 6cd460d..b246300 100755 --- a/bin/plc-kml.py +++ b/bin/plc-kml.py @@ -101,6 +101,29 @@ class KmlMap: baseurl='http://%s'%api.config.PLC_WWW_HOST peer_id=site['peer_id'] + # STYLE + # the size for google icons + if not self.options.use_custom_icons: + if not peer_id: + # local sites + iconfile=default_local_builtin + xyspec="12803232" + else: + # remote + iconfile=default_foreign_builtin + xyspec="16003232" + iconurl="root://icons/%(iconfile)s"%locals() + # the size for our own brew of icons + else: + if not peer_id: + iconfile=self.options.local_icon + else: + iconfile=self.options.foreign_icon + iconurl="%(baseurl)s/%(iconfile)s"%locals() + xyspec="" + + iconspec="%(iconurl)s%(xyspec)s"%locals() + # open description description = "
" @@ -113,10 +136,7 @@ class KmlMap: description += " %(peername)s "%locals() #description += "[description]"%locals() description += "" # URL @@ -162,29 +182,6 @@ class KmlMap: name="" description="" - # STYLE - # the size for google icons - if not self.options.use_custom_icons: - if not peer_id: - # local sites - iconfile=default_local_builtin - xyspec="12803232" - else: - # remote - iconfile=default_foreign_builtin - xyspec="16003232" - iconurl="root://icons/%(iconfile)s"%locals() - # the size for our own brew of icons - else: - if not peer_id: - iconfile=self.options.local_icon - else: - iconfile=self.options.foreign_icon - iconurl="%(baseurl)s/%(iconfile)s"%locals() - xyspec="" - - iconspec="%(iconurl)s%(xyspec)s"%locals() - # set the camera 50km high template="""
" - if peer_id: - description += ""%locals() - else: - description += ""%locals() + description += ""%locals() description += "