def getRotatedIconDict(self): if self.yaw == None: rot = 0 else: rot = self.yaw rotRounded = 10 * int(0.1 * rot + 0.5) if rotRounded == 360: rotRounded = 0 name = self.icon rotName = '%s%03d' % (name, rotRounded) return dict(url=getIconUrl(rotName), size=getIconSize(rotName))
def getIconDict(self, kind=''): return dict(url=getIconUrl(self.icon + kind), size=getIconSize(self.icon + kind))