elshae wrote:
>
> Hello all,
>
> I apologize if this has already been posted and answered, but my searching
> through the forum didn't yield me the results I was looking for. I have
> finally learned how to upload geometry data from my PostGIS database to
> Geoserver and display the resulting layers correctly. However, I do not
> just want to display the points or polygons, but would like to query my
> database for other things such as location names and also display that
> info on my layer in Geoserver. I have been searching for this for awhile,
> but I do not really understand where/how to begin.
>
> Thank you very much,
>
> elshae
>
Well I actually was finally able to find a way of adding labels to my maps
by using SLD's specifying text symbolizer XML code as such:
<TextSymbolizer>
<label><ogc:PropertyName>category</ogc:PropertyName></label>
<CssParameter name="font-family">Times New Roman</CssParameter>
<CssParameter name="font-style">Normal</CssParameter>
<CssParameter name="font-size">16</CssParameter>
<CssParameter name="font-weight">bold</CssParameter>
<Fill>
<CssParameter name="fill">#FF0000</CssParameter>
</Fill>
</TextSymbolizer>
However, I am struggling greatly with trying to display the fid (feature ID)
in the labels. Using any of the following just does not work :(
<label><ogc:PropertyName>fid</ogc:PropertyName></label>
<label><ogc:PropertyName>@gml:id</ogc:PropertyName></label>
I've even gone throught the SLD cookbook
http://projects.opengeo.org/suite/raw-attachment/ticket/622/sldcookbook.pdf
which does not seems to say anything about id labeling. If anyone knows
anything about this, please pass on the good word.
Thanks,
elshae
--
View this message in context:
http://old.nabble.com/Display-PostGIS-data-on-Geoserver-wms-layer-tp29671124p29678175.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users