本文整理匯總了Python中simplekml.base.Kmlable._chrconvert方法的典型用法代碼示例。如果您正苦於以下問題:Python Kmlable._chrconvert方法的具體用法?Python Kmlable._chrconvert怎麽用?Python Kmlable._chrconvert使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類simplekml.base.Kmlable
的用法示例。
在下文中一共展示了Kmlable._chrconvert方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __str__
# 需要導入模塊: from simplekml.base import Kmlable [as 別名]
# 或者: from simplekml.base.Kmlable import _chrconvert [as 別名]
def __str__(self):
buf = [u'<Data name="{0}">'.format(Kmlable._chrconvert(self.name))]
if self._kml['value'] is not None:
buf.append("<value>{0}</value>".format(self._kml['value']))
if self._kml['displayName'] is not None:
buf.append(u"<displayName>{0}</displayName>".format(Kmlable._chrconvert(self._kml['displayName'])))
buf.append('</Data>')
return "".join(buf)
示例2: __str__
# 需要導入模塊: from simplekml.base import Kmlable [as 別名]
# 或者: from simplekml.base.Kmlable import _chrconvert [as 別名]
def __str__(self):
if self._kml['maxlines'] is not None:
return u'<linkSnippet maxLines="{0}">{1}</linkSnippet>'.format(self._kml['maxlines'],Kmlable._chrconvert(self._kml['content']))
else:
return u'<linkSnippet>{0}</linkSnippet>'.format(Kmlable._chrconvert(self._kml['content']))