本文整理汇总了Python中pykml.factory.KML_ElementMaker.close方法的典型用法代码示例。如果您正苦于以下问题:Python KML_ElementMaker.close方法的具体用法?Python KML_ElementMaker.close怎么用?Python KML_ElementMaker.close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pykml.factory.KML_ElementMaker
的用法示例。
在下文中一共展示了KML_ElementMaker.close方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: from pykml.factory import KML_ElementMaker [as 别名]
# 或者: from pykml.factory.KML_ElementMaker import close [as 别名]
KML.Pair(KML.key("highlight"), KML.styleUrl("#sh_style")),
id="msn_hide",
),
)
)
### Places the results of the loops into the KML document as points.
for i in range(0, len(lat)):
if lat[i] != "":
kmlobj.Document.append(
KML.Placemark(
KML.Style(
KML.IconStyle(
KML.scale(0.5),
KML.Icon(KML.href("http://crec.unl.edu/images/Icons/OA%20Mountain%201%20Red.png")),
)
),
KML.name(names[i]),
KML.description(alt[i] + " " + "www.summitpost.org" + URLs[i]),
KML.styleUrl("#msn_hide"),
KML.Point(
KML.extrude(1),
KML.altitudeMode("relativeToGround"),
KML.coordinates("{lon},{lat},{alt}".format(lon=lon[i], lat=lat[i], alt=10)),
),
)
)
### saves the KML document as a file on the hard drive.
KML = open("summitpost.kml", "w")
KML.write(str(etree.tostring(etree.ElementTree(kmlobj), pretty_print=False))[2:-1])
KML.close()