Beispiel #1
0
 def __init__(self, report, icon_number ):
     if report.is_fixed:
         color = 'green'
     else:
         color = 'red'
     icon_number = icon_number
     img = "/media/images/marker/%s/marker%s.png" %( color, icon_number )
     name = 'letteredIcon%s' %( icon_number )      
     icon = GIcon(name,image=img,iconsize=(20,34))
     GMarker.__init__(self,geom=(report.point.x,report.point.y), title=report.title.replace('"',"'"), icon=icon)
Beispiel #2
0
 def __init__(self, report, icon_number ):
     if report.is_fixed:
         color = 'green'
     else:
         color = 'red'
     icon_number = icon_number
     img = "/media/images/marker/%s/marker%s.png" %( color, icon_number )
     name = 'letteredIcon%s' %( icon_number )      
     icon = GIcon(name,image=img,iconsize=(20,34))
     GMarker.__init__(self,geom=(report.point.x,report.point.y), title=report.title.replace('"',"'"), icon=icon)
Beispiel #3
0
 def __init__(self, report, icon_number):
     if report.status is 'fixed':
         color = 'green'
     elif report.status is 'not-fixed':
         color = 'red'
     elif report.status is 'in-progress':
         color = 'yellow'
     icon_number = icon_number
     # img = "/static/images/marker/%s/marker%s.png" %( color, icon_number )
     img = "/static/images/marker/%s/blank.png" % ( color)
     name = 'letteredIcon%s' % ( icon_number )
     gIcon = GIcon(name, image=img, iconsize=(20, 34))
     GMarker.__init__(self, geom=(report.point.x, report.point.y),
                      title=json.dumps(report.title, ensure_ascii=False)[1:-1], icon=gIcon)