嵌套KMZ文件 [英] Nesting KMZ files

查看:77
本文介绍了嵌套KMZ文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以创建一个由几个较小的KMZ文件组成的KMZ文件?我希望不必手动合并实际的KML实体,但是如果那是唯一的选择,那么我会的.

Is it possible to create one KMZ file that is composed of several smaller KMZ files? I would prefer to not have to manually merge the actual KML entities, but I will if that's the only option.

推荐答案

一个KMZ文件可以具有任意数量的内部KML文件(不是KMZ文件).但是KMZ文件中的第一个条目必须是根KML文件(通常命名为 doc.kml ),该文件可能包含引用其他KML或KMZ文件的网络链接.例如,几个内部KML文件可以通过相对URL引用共享样式(在另一个KML文件中).

A KMZ file can have any number of inner KML files (NOT KMZ files). But the first entry in the KMZ file must be the root KML file (typically named doc.kml), which may include network links with references to other KML or KMZ files. Several inner KML files, for example, could reference a shared style (in another KML file) via relative URLs.

内部KML文件可以嵌套到其他KML文件的任何深度,因此您可以创建嵌套KML文件的层次结构.

The inner KML files can nest to any level of depth to other KML files so you can create a hierarchy of nested KML files.

KMZ文件,因此不建议这样做.如果要让根KMZ文件引用其他子KMZ文件,则子KMZ文件不应是根KMZ文件的子条目,而应位于Web服务器或文件系统中的相同相对上下文中.

KMZ files within KMZ files is not supported in Google Earth so that is not recommended. If you want a root KMZ file to reference other sub-KMZ files then the sub-KMZ files should not be sub-entries of the root KMZ file but located at the same relative context in the web server or file system.

这是KMZ文件中的根KML文件的样子,其中包括至少两个子KML文件.

Here is what a root KML file in a KMZ file would look like that includes at least two sub-KML files.

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
    <Document>
        <NetworkLink>
            <Link>
                <href>test1.kml</href>
            </Link>
        </NetworkLink>
        <NetworkLink>
            <Link>
                <href>test2.kml</href>
            </Link>
        </NetworkLink>
        ...
    </Document>
</kml>

您可以将可见性标记设置为0或添加单选文件夹以有选择地加载内部KML文件或添加 Region 元素以在给定区域处于活动状态时加载.这需要扩展到许多功能以实现良好的性能.

You can set visibility tag to 0 or add radio folders to selectively load inner KML files or add Region elements to load when given region is active. This would be needed to scale to lots of Features to achieve good performance.

参考: https://developers.google.com/kml/documentation/kmlreference#网络链接

这篇关于嵌套KMZ文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆