I need to view KMZ files with OpenLayers.
The KMZ I am working with is on GitHub.
The structure of the KMZ (zip) file is:
wash/
files/
wash-dc.png
wash-dc.kml
wash-dc.png is:
The content of the kml file is:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Folder>
<GroundOverlay>
<Icon>
<href>files/wash-dc.png</href>
</Icon>
<LatLonBox>
<north>38.9098629826801456</north>
<south>38.8880073821501711</south>
<east>-77.0497762322933539</east>
<west>-77.0120905091252439</west>
<rotation>0</rotation>
</LatLonBox>
</GroundOverlay>
</Folder>
</kml>
If I double click on the kmz file, the Google Earth App I have installed on my local machine launches and successfully displays the KMZ:
I have found the OpenLayers example on OpenLayers website.
However, when I try dropping my KMZ file on it, it does not work. There are no errors in the console. The view in DC is:
How would this sample code need to change so my KMZ can be viewed? Or, is there something wrong with my KMZ?
At present, the KML parser in OpenLayers doesn't support GroundOverlays.
See (old, but still relevant):