Search code examples
openlayerskml

KML/OpenLayers GroundOverlay element that doesn't have <Document> tags not loading onto map?


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>

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.

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.


Solution

  • It is not supported in OpenLayers

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