labeling with SLDs in MapServer

Laura Díaz laura.diaz at IVER.ES
Thu Mar 30 10:11:52 EST 2006


Hi all,
i am trying to label a layer i have defined in my map file, it is a point shapefile layer, the 
SLD i am using is as follows:
<StyledLayerDescriptor>
	<NamedLayer>
		<Name>hojas_label</Name>
		<UserStyle>
		    <Name>default:hojas_label:COD10000</Name>
		    <IsDefault>1</IsDefault>
		    <FeatureTypeStyle>
		    <Rule>
			<Name>labels</Name>
			<TextSymbolizer>
			    <Label>
				<ogc:PropertyName>HOJAS10_ID</ogc:PropertyName>
			    </Label>
				<Font>
				<CssParameter name="font-family">Serif</CssParameter>
				<CssParameter name="font-style">normal</CssParameter>
				<CssParameter name="font-weight">normal</CssParameter>
				<CssParameter name="font-size">12</CssParameter>
				<CssParameter name="font-color">#000000</CssParameter>
				</Font>				
				    <LabelPlacement>				    
					<LinePlacement>
					<PerpendicularOffset>above</PerpendicularOffset>
					<LineWidth>2.5</LineWidth>
					<Gap>5</Gap>
					</LinePlacement>
				    </LabelPlacement>
			</TextSymbolizer>
		    </Rule>
		    </FeatureTypeStyle>
		</UserStyle>
	</NamedLayer>
</StyledLayerDescriptor>

When i request a GetMap with this layer and using this SLD i get the message from 
Mapserver:
<ServiceExceptionReport version="1.1.1">
<ServiceException>
msDrawMap(): Image handling error. Failed to draw layer named 'hojas_label'.
msDBFGetItemIndex(): DBASE file error. Item 'PropertyName' not found.
</ServiceException>
</ServiceExceptionReport>
i´ve checked out the name of the field i want to label, and it is correct, actually i did try 
with all the fields and i have the same problem, the layer is good as well because i can 
visualize it if i just don't use this SLD....
Any ideas?

thanks in advance,

Laura
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060330/c066b670/attachment.html


More information about the mapserver-users mailing list