[Geoserver-devel] [jira] Created: (GEOS-538) KML multiple layers

KML multiple layers
-------------------

         Key: GEOS-538
         URL: http://jira.codehaus.org/browse/GEOS-538
     Project: GeoServer
        Type: Bug

    Reporter: Brent Owens
Assigned to: Brent Owens
     Fix For: 1.3.x

            I've run into a problem using the format=kml from GeoServer WMS with multiple layers.

Using a WMS call like this:

http://localhost:80/geoserver/wms?request=GetMap&layers=geo:county,geo:state&styles=county,state&srs=EPSG:4326&bbox=-112.8122181892395,39.73163557052612,-110.52941274642944,42.0144407749176&WIDTH=1000&HEIGHT=1000&format=kml

The resulting kml file produces an error in the standard GoogleEarth viewer:

"parse error only a single root object allowed within <kml> tag ..."

Looking at the kml output I can see that there are multiple <Folder> elements like this:

<?xml version="1.0" encoding="UTF-8"?>
            <kml xmlns="http://earth.google.com/kml/2.0&quot;&gt;
<Folder><Placemark><GeometryCollection.....
  .
  .
</Folder>
<Folder>
  .
  .
</Folder>
</kml>

Manually revising the kml to have a folder hierarchy like this:

<?xml version="1.0" encoding="UTF-8"?>
            <kml xmlns="http://earth.google.com/kml/2.0&quot;&gt;
<Folder>
  <Folder><Placemark><GeometryCollection.....
    .
    .
  </Folder>

  <Folder>
    .
    .
  </Folder>
</Folder>
</kml>

This allows the temporary places kml to be added in the GoogleEarth view.

The format=application/vnd.google-earth.kml+xml is a really nice addition the Output formats!

thanks

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira