Hello,<br>I tried the new WFS code but I still get this response:<br><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;!DOCTYPE ServiceExceptionReport SYSTEM &quot;http:<br>
//<a href="http://schemas.opengis.net/wms/1.1.1/WMS_exception_1_1_1.dtd">schemas.opengis.net/wms/1.1.1/WMS_exception_1_1_1.dtd</a>&quot;&gt; &lt;ServiceExceptionReport version=&quot;1.1.1&quot; &gt; <br>  &lt;ServiceException code=&quot;MissingParameterValue&quot; locator=&quot;request&quot;&gt;<br>
      Could not determine geoserver request from http request org.apache.catalina.connector.RequestFacade<br>@10f829<br>&lt;/ServiceException&gt;&lt;/ServiceExceptionReport&gt;<br></pre><br>I wonder if this WFS call can give me what I want with a KML response. I want to be able to click on the location and a popup with a style for the popup, show a picture, a link etc. fetched from the PostgreSQL table.<br>
<br>/asle<br><br><div class="gmail_quote">2009/3/27 Andreas Hocevar <span dir="ltr">&lt;<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<div class="im"><br>
On Thu, Mar 26, 2009 at 5:08 PM, Asle Benoni &lt;<a href="mailto:asle.benoni@gmail.com">asle.benoni@gmail.com</a>&gt; wrote:<br>
&gt; I am really frustrated about not beeing able to display a kmz layer in<br>
&gt; OpenLayers.<br>
&gt; Here is the code:<br>
&gt;<br>
&gt;                 map.addLayer(new OpenLayers.Layer.GML(&quot;Gravminne&quot;, &quot;<a href="http://naturkart.no:8080/geoserver/wms/kml?layers=kulturminner_ns:gravminne&amp;format=application/vnd.google-earth.kml+XML&amp;transparent=true&amp;srs=EPSG:4326&amp;transparent=true&amp;" target="_blank">http://naturkart.no:8080/geoserver/wms/kml?layers=kulturminner_ns:gravminne&amp;format=application/vnd.google-earth.kml+XML&amp;transparent=true&amp;srs=EPSG:4326&amp;transparent=true&amp;</a><br>

&gt; &quot;,<br>
&gt;                {<br>
&gt;                 format: OpenLayers.Format.KML,<br>
&gt;                 formatOptions: {<br>
&gt;                   extractStyles: true,<br>
&gt;                   extractAttributes: true,<br>
&gt;                   transparent:true<br>
&gt;                 }<br>
&gt;                }));<br>
<br>
</div>The geoserver url you are using here will always return KMZ, which<br>
OpenLayers cannot parse. Instead, you should use the following to<br>
create your layer:<br>
<br>
map.addLayer(new OpenLayers.Layer.WFS(&quot;Gravminne&quot;,<br>
&quot;<a href="http://naturkart.no:8080/geoserver/wms?service=WMS&amp;request=GetMap&amp;layers=kulturminner_ns:gravminne&amp;format=kml&amp;srs=EPSG:4326" target="_blank">http://naturkart.no:8080/geoserver/wms?service=WMS&amp;request=GetMap&amp;layers=kulturminner_ns:gravminne&amp;format=kml&amp;srs=EPSG:4326</a>&quot;,<br>

<div class="im">                {<br>
                 format: OpenLayers.Format.KML,<br>
                 formatOptions: {<br>
                   extractStyles: true,<br>
                   extractAttributes: true<br>
                 }<br>
</div>                }));<br>
<br>
Is there a specific reason why you  want to use KML? WFS would give<br>
you the same result, you would only have to use a style map for your<br>
symbology in addition. This is how to add the layer using the new WFS<br>
protocol:<br>
<br>
map.addLayer(new OpenLayers.Layer.Vector(&quot;Gravminne&quot;, {<br>
    strategies: [new OpenLayers.Strategy.BBOX()],<br>
    protocol: new OpenLayers.Protocol.WFS({<br>
        url: &quot;<a href="http://naturkart.no:8080/geoserver/wfs" target="_blank">http://naturkart.no:8080/geoserver/wfs</a>&quot;,<br>
        typeName: &quot;gravminne&quot;,<br>
        featurePrefix: &quot;kulturminner_ns&quot;<br>
    })<br>
));<br>
<br>
For the symbology, you can use OpenLayers.Format.SLD to use a sld file<br>
that you already have on your server. Look at examples/SLD.html to see<br>
how to configure this.<br>
<br>
And you need OpenLayers.ProxyHost configured with a working proxy url.<br>
<br>
If a map image rendered on the server would also do, you could just<br>
use a WMS layer, and don&#39;t even need a ProxyHost:<br>
<br>
map.addLayer(new OpenLayers.Layer.WMS(&quot;Gravminne&quot;;<br>
&quot;<a href="http://naturkart.no:8080/geoserver/wms" target="_blank">http://naturkart.no:8080/geoserver/wms</a>?&quot;, {<br>
    transparent: true,<br>
    layers: &quot;kulturminner_ns:gravminne&quot;<br>
<div class="im">}));<br>
}<br>
<br>
&gt; I can see the http request from the proxy so it is fetching correct<br>
&gt; data (I think) but I cannot see any on the map!<br>
&gt; The request looks like this (FireBug). I am not sure if the EPSG is<br>
&gt; correct. I also tried &quot;EPSG:32632&quot; which I set for the map.<br>
<br>
</div>With the WFS setup above (first of my code snippets), the data should<br>
be automatically reprojected to the SRS of your map.<br>
<div class="im"><br>
&gt; Can anyone point to how to show a KMZ file from GeoServer as I need<br>
&gt; the options for that layer format. I checked the docs but did not get<br>
&gt; wiser.<br>
<br>
</div>As already said, OpenLayers can not parse KMZ, only KML. To make<br>
GeoServer output KML, your request would have to be a WMS request and<br>
look like this:<br>
<br>
<a href="http://naturkart.no:8080/geoserver/wms/?service=wms&amp;request=GetMap&amp;layers=kulturminner_ns:gravminne&amp;format=application/vnd.google-earth.kml+XML&amp;format=kml&amp;bbox=0,0,180,90&amp;width=500&amp;height=250&amp;srs=EPSG:4326" target="_blank">http://naturkart.no:8080/geoserver/wms/?service=wms&amp;request=GetMap&amp;layers=kulturminner_ns:gravminne&amp;format=application/vnd.google-earth.kml+XML&amp;format=kml&amp;bbox=0,0,180,90&amp;width=500&amp;height=250&amp;srs=EPSG:4326</a><br>

<br>
This is what will get generated with the second of my code snippets above.<br>
<br>
Regards,<br>
Andreas.<br>
<font color="#888888"><br>
--<br>
Andreas Hocevar<br>
OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
Expert service straight from the developers.<br>
</font></blockquote></div><br>