[OpenLayers-Users] WFS layer not visible

Jerome A. Wendell jawendell at suddenlink.net
Tue Jun 4 11:29:27 PDT 2013


Nipuni,

 

Try adding the port number to the domain in the URL and in your proxy file.

 

Hope this helps,

 

Jerome

 

 

From: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] On Behalf Of Nipuni Perera
Sent: Tuesday, June 04, 2013 2:13 PM
To: openlayers-users at lists.osgeo.org
Subject: [OpenLayers-Users] WFS layer not visible

 

Hi,

I am trying to display a simple WFS layer. This is my code for setting up
WFS layer.

 var layer = new OpenLayers.Layer.Vector("WFS", {
                strategies: [new OpenLayers.Strategy.BBOX()],
                protocol: new OpenLayers.Protocol.WFS({
                    version: "1.1.0",
                    url:  "http://demo.opengeo.org/geoserver/wfs",
                    featureType: "tasmania_roads",
                    featureNS: "http://www.openplans.org/topp",
                    geometryName: "the_geom"
                })
            });

I have set up the proxyHost variable as follows and added 'demo.opengeo.org'
and  'www.openplans.org' to my proxy.cgi script.

OpenLayers.ProxyHost= "proxy.cgi?url=";

This does not show the required WFS features on the map. When I check it
with firebug, I can see the POST request and it gives the response similar
to the proxy.cgi script file, instead of an XML response.

Thanks,

Nipuni


-- 

Nipuni Piyabasi Perera

Undergraduate

Department of Computer Science And Engineering

University of Moratuwa

Sri Lanka

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130604/060941fd/attachment.html>


More information about the Users mailing list