[OpenLayers-Users] Re: attribute data of a shape file(WMS)
krnadik
lorie.arboleda at gmail.com
Thu Apr 26 02:48:58 EDT 2012
Hi,
Do you want to display the attribute data on the map itself?
If so, there is a feature in GeoServer where you can set the style of the
layer through Styles.
To add a text in a line, here is a sample for a road:
<TextSymbolizer>
<Label>
<ogc:PropertyName>ROAD_NAME(name of the column from the shape
file you want to show)</ogc:PropertyName>
</Label>
<LabelPlacement>
<LinePlacement/>
</LabelPlacement>
<Fill>
<CssParameter name="fill">#000000</CssParameter>
</Fill>
<VendorOption name="followLine">true</VendorOption>
<VendorOption name="maxAngleDelta">90</VendorOption>
<VendorOption name="maxDisplacement">400</VendorOption>
<VendorOption name="repeat">150</VendorOption>
</TextSymbolizer>
You can add more than one type of attribute to be displayed.
Sorry if it's a little bit off-topic and the solution is not exactly using
Open Layers.
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/attribute-data-of-a-shape-file-WMS-tp4929655p4929815.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list