[OpenLayers-Dev] How to append outputFormat: "OGR-KML" to wfs protocal url

Phil Scadden p.scadden at gns.cri.nz
Wed Oct 19 16:13:09 EDT 2011


> My  wfs protocal is
> var wfsProtocol = new OpenLayers.Protocol.WFS({
>          		url: "http://localhost:8080/geoserver/wfs",
>          		featureType:stateLayer.name,
>          		featureNS:"http://kcubeconsulting.com/geobrowser",
>          		srsName: "EPSG:4326",
>          		version: "1.0.0"
> });
I believe the outputFormat parameter belongs in the read call that you 
make with this protocol. However, if you are doing this to make an 
"export to kml" function, then its probably a lot simpler to do:
window.open("http://localhost:8080/geoserver/wfs" + 
'?service=WFS&version=1.0.0&request=GetFeature&outputFormat=OGR-KML&typeName=stateLayer.name);


Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.



More information about the Dev mailing list