<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">Hi,<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>I'm using OpenLayers with MapServer and Postgis.<br>
I want to draw saved features in a vector layer for modify.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>This is my code but I can't see anything in my map:<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>var vectors = new OpenLayers.Layer.Vector("WFS", {<br>
strategies: [new OpenLayers.Strategy.BBOX()],<br>
protocol: new OpenLayers.Protocol.WFS({<br>
version: "1.0.0",<br>
url: "http://host:port/cgi-bin/mywfs",<br>
featureType: "test",<br>
srsName: "EPSG:4326",<br>
featureNS : "http://host:port", <br>
geometryName: "geom",<br>
schema: "http://host:port/cgi-<br>
bin/mywfs?service=WFS&version=1.0.0&request=DescribeFeatureType&TypeName=test"<br>
})<br>
});<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>And this is my layer definition in the MapServer's map file:<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>LAYER<br>
NAME test<br>
METADATA<br>
"wfs_title" "test"<br>
"gml_featureid" "id"<br>
"gml_include_items" "all"<br>
END<br>
TYPE POINT<br>
STATUS ON<br>
CONNECTIONTYPE postgis<br>
CONNECTION "host=localhost port=5432 dbname=mydb user=postgres <br>
password=*****"<br>
DATA "geom from test"<br>
DUMP TRUE<br>
PROJECTION<br>
"init=epsg:4326"<br>
END<br>
CLASS<br>
NAME "test"<br>
STYLE<br>
COLOR 200 255 0<br>
OUTLINECOLOR 120 120 120<br>
END<br>
END<br>
END <br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Thanks!<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>-- <br>
Iratxe Lejarreta<br>
www.axios.es</p></body></html>