[OpenLayers-Users] draw feature in a vector layer

Marco Scheuble mail at marco-scheuble.de
Wed Oct 28 02:51:38 EDT 2009


Hi Iratxe,

For WFS-T you have to use geoserver. 
UMN Mapserver does only support WFS!
So, if you see your Features in OL everything is fine with your wfs.

Marco




Iratxe Lejarreta wrote:
> 
> 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
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://n2.nabble.com/draw-feature-in-a-vector-layer-tp3900347p3903839.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list