it appears to work well if I copy-past this in the search for
maps.google.com:
Ignore the syntax problems in the styleUrl.
Understanding that .KMZ is basically a zipped version of a .KML file,
I wrote following piece of code to unzip:
URL url = new URL("http://activefiremaps.fs.fed.us/kml/
conus.kmz");
HttpURLConnection http =
(HttpURLConnection)url.openConnection();
InputStream fin = http.getInputStream();
ZipInputStream zin = new ZipInputStream(fin);
zin.getNextEntry();
xr.parse(new InputSource(zin));
However I get an exception at the following line:
zin.getNextEntry();
Exception in thread "main" java.util.zip.ZipException: only DEFLATED
entries can have EXT descriptor
at java.util.zip.ZipInputStream.readLOC(ZipInputStream.java:
253)
at
java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:74)
at kmlloader.KMLInStreamer.main(KMLInStreamer.java:131)
Any idea what is going on?
Thanks,
Jo Desmet.