[OpenLayers-Dev] draw feature in a vector layer
Iratxe Lejarreta
iratxe.lejarreta at axios.es
Tue Oct 27 13:10:28 EDT 2009
Hi,
I'm using OpenLayers with MapServer and Postgis.
I want to draw saved features in a vector layer for modify.
This is my code but I can't see anything in my map:
var vectors = new OpenLayers.Layer.Vector("WFS", {
strategies: [new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.WFS({
version: "1.0.0",
url: "http://host:port/cgi-bin/mywfs",
featureType: "test",
srsName: "EPSG:4326",
featureNS : "http://host:port",
geometryName: "geom",
schema: "http://host:port/cgi-
bin/mywfs?service=WFS&version=1.0.0&request=DescribeFeatureType&TypeName=test"
})
});
And this is my layer definition in the MapServer's map file:
LAYER
NAME test
METADATA
"wfs_title" "test"
"gml_featureid" "id"
"gml_include_items" "all"
END
TYPE POINT
STATUS ON
CONNECTIONTYPE postgis
CONNECTION "host=localhost port=5432 dbname=mydb user=postgres
password=*****"
DATA "geom from test"
DUMP TRUE
PROJECTION
"init=epsg:4326"
END
CLASS
NAME "test"
STYLE
COLOR 200 255 0
OUTLINECOLOR 120 120 120
END
END
END
Thanks!
--
Iratxe Lejarreta
www.axios.es
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20091027/c3b520ea/attachment.html
More information about the Dev
mailing list