style text for points

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

style text for points

Henriksen, Jonas F
Hi,

I am trying to style points in geoserver (version 1.3rc1 on windows XP) using sld. I have the following style:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- a named layer is the basic building block of an sld document -->
<NamedLayer><Name>normal</Name>
<UserStyle>
    <!-- again they have names, titles and abstracts -->
  <Title>A boring default style</Title>
  <Abstract>A sample style that just prints out a black line for everything</Abstract>
    <!-- FeatureTypeStyles describe how to render different features -->
    <!-- a feature type for polygons -->
    <FeatureTypeStyle>
      <FeatureTypeName>Feature</FeatureTypeName>
      <Rule>
        <PointSymbolizer>
       <Graphic>
        <Mark>
        <WellKnownName>circle</WellKnownName>
        <Fill>
        <CssParameter name="fill">#000000</CssParameter>
        </Fill></Mark><Size>10.0</Size></Graphic>
        </PointSymbolizer>
           <TextSymbolizer>
                <Label><PropertyName>name</PropertyName></Label>
                <Font>
                    <CssParameter name="font-family">Lucida Sans</CssParameter>
                    <CssParameter name="font-weight">bold</CssParameter>
                    <CssParameter name="font-Size">
                        <literal>10</literal>
                    </CssParameter>
                </Font>
                <LabelPlacement>
                <PointPlacement>
                <Displacement>
                <DisplacementX>-10</DisplacementX>
                <DisplacementY>-20</DisplacementY>
                </Displacement>
                </PointPlacement>
                </LabelPlacement>
                <Fill>
                    <CssParameter name="fill">#000000</CssParameter>
                </Fill>
                <Halo/>
            </TextSymbolizer>
     <TextSymbolizer>
                <Label><PropertyName>Time</PropertyName></Label>
                <Font>
                    <CssParameter name="font-family">Lucida Sans</CssParameter>
                    <CssParameter name="font-weight">normal</CssParameter>
                    <CssParameter name="font-Size">
                        <literal>10</literal>
                    </CssParameter>
                </Font>
                <LabelPlacement>
                <PointPlacement>
                <Displacement>
                <DisplacementX>-10</DisplacementX>
                <DisplacementY>-10</DisplacementY>
                </Displacement>
                </PointPlacement>
                </LabelPlacement>
                <Fill>
                    <CssParameter name="fill">#000000</CssParameter>
                </Fill>
                <Halo/>
            </TextSymbolizer>
      </Rule>
    </FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>


This works fine when theere is only one point returned from the wms, it gets tagged vith a name and a time. However, when 2 points are returned, the first is tagged with a name, and the second with the time. What I would like is that both points are tagged with both name and time. Can anyone see if I'm doing something wrong?

regards Jonas:))))

--
Jonas F Henriksen
Institute of Marine Research
Norsk Marint Datasenter
PO Box 1870 Nordnes
5817 Bergen
Norway
 
Phone: +47 55238441



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users