[OpenLayers-Users] Configure ProxyHost and KML files

Asle Benoni asle.benoni at gmail.com
Wed May 13 17:59:00 EDT 2009


Hello again,
Is anyone running proxy.cgi on Mac OS X 10.5 Server? I believe it must  
be a problem with server since I have tested it on OS X 10.5 Leopard  
client and it works fine there.

/asle

Den 13. mai. 2009 kl. 00.03 skrev Asle Benoni:

>
> Hello,
> This problem is still not solved. I believe it has to do with  
> proxy.cgi.  If I do a request from proxy.cgi on another linux server  
> it works fine but with the proxy.cgi on my Mac OS X Server it fails.  
> See the attached screenshots.
>
> The headers that are sent (from proxy.cgi?) is "application/ 
> vnd.ogc.se_xml" and it is ...kml... when proxy.cgi is on another  
> linux server.
> So you see the response is not interpretable. Is there a another  
> version of proxy.cgi for Mac? I checked calling proxy.cgi directly  
> and it redirects to openayers.org. So it should work?
>
> Is there a way to  rewrite the headers so the server will understand  
> it?
> I am completely lost since I cannot use KML or WFS on this server.
>
> /asle
>
> <Bilde 6.png><Bilde 5.png>
> Den 26. mars. 2009 kl. 13.31 skrev Alexandre Dube:
>
>> OpenLayers.Format.KMZ doesn't exist.  You should try KML instead  
>> and have &format=application/vnd.google-earth.kml+XML in your url  
>> instead.  I never tried it thought, but that's what I would try.
>>
>> By the way, KMZ is a zipped version of a KML.  You could replace a  
>> file.kmz to file.zip then unzip it and you would have your  
>> uncompressed KML.  OpenLayers currently can't read KMZ files.
>>
>> Regards,
>>
>> Alexandre
>>
>> Asle Benoni wrote:
>>> Yes, I have read that and configured proxy.cgi with the domains of  
>>> the server.
>>> Now the layer I get from GeoServer is KMZ and not KML (don´t know  
>>> why) so I put the code like this in my html.
>>>
>>> OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";
>>>
>>>             map.addLayer(new OpenLayers.Layer.GML("KML", "http://naturkart.no:8080/geoserver/wms/kml?layers=kulturminner_ns:gravminne&format=application/vnd.google-earth.kmz+XML& 
>>> ",
>>>               {
>>>                format: OpenLayers.Format.KMZ,
>>>                formatOptions: {
>>>                  extractStyles: true,
>>>                  extractAttributes: true
>>>                }
>>>               }));
>>>
>>> I see now in FireBug that a http request is done to the kmz file  
>>> but I do not see the layer in the map.
>>>
>>> /asle
>>>
>>>
>>
>>
>> -- 
>> Alexandre Dubé
>> Mapgears
>> www.mapgears.com
>>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090513/4c3c14fa/attachment.html


More information about the Users mailing list