Hi,

If I understood right you are using Mapserver as a WFS server and and you await 
that your WFS client, for example QGis, shows the layer with similar styles 
than it shows the same Mapserver layer through WMS.

WMS and WFS are very different things. WFS sends pure data in XML format and 
there are attributes and coordinates but no colors nor line widths. Something 
like this
http://188.64.1.61/cgi-bin/tinyows?service=WFS&version=1.1.0&request=GetFeature&typeName=lv:mml_paikannimet20&maxFeatures=20

For the client WFS is a vector layer and you must define the styles on the 
client side. However, automatic styling of WFS layers might be possible by 
utilising the OGR feature style system
http://fi.search.yahoo.com/search?p=ogr+feature+style+support&ei=UTF-8&fr=moz35
Currently Mapserver can convert OGR styles from the source data into Mapserver 
classes.
http://www.mapserver.org/input/vector/ogr.html#styleitem-auto-rendering-layers-using-style-information-from-the-ogr-file

If Mapserver could do it in an opposite way and populate an additional 
OGR_STYLES field of WFS Feature Type from layer styles and if the WFS client 
could utilize OGR_STYLES automatically for rendering it might work. Perhaps an 
idea for the Google Summer of Code?

-Jukka Rahkonen-
________________________________
Lähettäjä: [email protected] 
[[email protected]] käyttäjän Murad Jamal 
[[email protected]] puolesta
Lähetetty: 27. maaliskuuta 2013 5:58
Vastaanottaja: [email protected]
Aihe: [mapserver-users] WFS Server Layer styles not displaying

Hello,

I have been recently testing mapserver with WFS layer.

The wfs layer appears – however it completely ignores my CLASS Styles. I used 
WMS before – it worked without any issue.
Anything I am doing wrong here? Or Does mapserver doesn’t support styling for 
WFS layers through CLASS definitions?

Here is my Layer Definition in map file . Using mapserver ver 6.0.2

LAYER
    NAME "bldg"
    METADATA
      "wfs_title"         "Building Footprints" ##REQUIRED
      "wfs_srs"           "EPSG:28356" ## REQUIRED
      "gml_include_items" "all" ## Optional (serves all attributes for layer)
      "gml_featureid"     "ID" ## REQUIRED
      "wfs_enable_request" "*"
  END
    TYPE polygon
    STATUS OFF
    #DATA "site/bldg_region"
   CONNECTIONTYPE PLUGIN
                                                PLUGIN 
"C:/ms4w/Apache/specialplugins/msplugin_mssql2008.dll"
    CONNECTION "server=abc;uid= abc;pwd= abc;database= abc;Integrated 
Security=false"
    DATA "geom from bldg USING SRID=28356"

    TRANSPARENCY 100
    PROJECTION
      "init=epsg:28356"
    END
    CLASS
      NAME 'Building Footprints'
      STYLE
        COLOR 255 128 000
        OUTLINECOLOR 255 255 255
        WIDTH 2
      END
    END #class
  END #layer


Regards

Murad
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to