当前位置: 首页>>代码示例>>Python>>正文


Python KML_ElementMaker.close方法代码示例

本文整理汇总了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()
开发者ID:Sdmillheim,项目名称:Summitpost,代码行数:32,代码来源:summitpost-into-google-earth.py


注:本文中的pykml.factory.KML_ElementMaker.close方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。