[OpenLayers-Users] OpenLayers.Protocol.HTTP
Robert Sanson
Robert.Sanson at asurequality.com
Mon Sep 12 18:53:28 EDT 2011
I am trying to access a WFS service from a remote server. I have added wfs.data.linz.govt.nz to my proxy.cgi script. Firebug is reporting an error in the response:
<Some unexpected error occurred. Error text was: <urlopen error (10065, 'No route to host')>
Yet, If I take the URL sent and copy it into a Browser URL, I get GML returned correctly. The URL sent is like this:
<A href="http://wfs.data.linz.govt.nz//wfs?version=1.0.0&service=WFS&request=GetFeature&maxfeatures=5&typename=x823&http://wfs.data.linz.govt.nz/<MY-KEY>/wfs?version=1.0.0&service=WFS&request=GetFeature&maxfeatures=5&typename=x823&bbox=172.5132794038,-43.710577165498,172.65692985022,-43.634349733512
Any ideas why I get this error? My code is:
var parwfs = new OpenLayers.Layer.Vector("WFS Parcels", {
strategies: [new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.HTTP({
url: "<A href="http://wfs.data.linz.govt.nz/http://wfs.data.linz.govt.nz/<MY-KEY>/wfs",
headers: {"Content-Type": "plain/text"},
params: {
version: "1.0.0",
service: "WFS",
request: "GetFeature",
//srsName: "EPSG:2193",
maxfeatures: "5",
typename: "x823"
},
format: new OpenLayers.Format.GML()
}),
projection: new OpenLayers.Projection("EPSG:4326"),
style: {strokeColor: "green", strokeWidth: 2, strokeOpacity: 0.5},
minScale: 50000,
visibility: false
});
map.addLayer(parwfs);
Many thanks,
Robert Sanson
This email and any attachments are confidential and intended solely for the addressee(s). If you are not the intended recipient, please notify us immediately and then delete this email from your system.
This message has been scanned for Malware and Viruses by Websense Hosted Security.
www.websense.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110913/f7af1e1f/attachment.html
More information about the Users
mailing list