Hi list,
I'm currently trying to filter features from a layer via a SLD, but using the
style defined by the service. I managed to get a NamedStyle by defining a
classgroup and assigning the class with the group.
When I set the style via SLD to mv2, it works perfectly, but when I add the
filterpart (LayerFeatureConstraints) it fails: the default style is used and no
filtering occurs.
Am I doing something wrong, of is filtering nog possible via
LayerFeatureConstraints?
Mapfile:
layer
name telpunten_motorvoertuig_punt
CLASSGROUP "mv"
metadata
"wms_title" "telpunten_points"
"gml_include_items" "all"
"wfs_featureid" "id"
end
group telpunten
status off
type point
dump true
template bla
connectiontype postgis
connection CONNECTIONSTATEMENT
data "locatie from (select id, nummer, locatie, coalesce(soort,'Onbekend') as
wb_soort, wegnummer from telpunt ) as foo using srid=28992 using unique id"
projection
"init=epsg:28992"
end
classitem wb_soort
class
NAME "motorvoertuig"
group "mv"
expression "MOTORVOERTUIG"
style
symbol "square"
color 0 204 204
outlinecolor 0 0 0
size 8
end
end
class
NAME "motorvoertuig2"
group "mv2"
expression "MOTORVOERTUIG"
style
symbol "square"
color 255 0 0
outlinecolor 0 0 0
size 8
end
end
processing "CLOSE_CONNECTION=DEFER"
end
The SLD:
<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor xmlns:app="http://www.deegree.org/app"
xmlns:deegreeogc="http://www.deegree.org/ogc"
xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:sld="http://www.opengis.net/sld"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:se="http://www.opengis.net/se"
version="1.0.0">
<sld:NamedLayer xmlns="http://www.opengis.net/sld">
<se:Name>telpunten_motorvoertuig_punt</se:Name>
<sld:NamedStyle>
<se:Name>mv</se:Name>
</sld:NamedStyle>
<sld:LayerFeatureConstraints>
<Fsld:eatureTypeConstraint>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>wegnummer</ogc:PropertyName>
<ogc:Literal>A28</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</sld:FeatureTypeConstraint>
</sld:LayerFeatureConstraints>
</sld:NamedLayer>
</sld:StyledLayerDescriptor>
Thanks in advance!
Meine Toonen
B3Partners BV
Tel: 030 214 2083_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users