没有< Document>的KML/OpenLayers GroundOverlay元素标签没有加载到地图上? [英] KML/OpenLayers GroundOverlay element that doesn't have <Document> tags not loading onto map?

查看:161
本文介绍了没有< Document>的KML/OpenLayers GroundOverlay元素标签没有加载到地图上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个没有文档标签的KML元素,而只是...(带有一些不相关元素的标签已用...删除)

I have a KML element with no document tags and just tags like...(with some irrelevant elements removed with ...)

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<GroundOverlay>
    <name>...</name>
    <description>...</description>
    <Icon><href>...</href></Icon>
    <LatLonBox>
       ...
    </LatLonBox>
</GroundOverlay>
</kml>

在OpenLayers中,如果没有GroundOverlay周围的文档标签,则无法加载它.但是,我可以得到一个地标,它是没有文档标签即可加载的根节点.

In OpenLayers, I can't get this to load without document tags around the GroundOverlay. I can however get a place mark that is the root node with no document tags to load fine.

有没有一种方法可以将带有GroundOverlay根节点的KML转换为没有文档标签的KML?在其他渲染器(例如Google Earth和Cesium)中似乎可以很好地加载.

Is there a way to a KML with a GroundOverlay root node into KML that doesn't have document tags? It seems to load fine in other renderers like Google Earth and Cesium.

推荐答案

OpenLayers不支持

It is not supported in OpenLayers

https://github.com/openlayers/openlayers/issues/2941

这篇关于没有&lt; Document&gt;的KML/OpenLayers GroundOverlay元素标签没有加载到地图上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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