Hi All,
I am trying to use the TextSymbolizer that Edward suggested but now I have
no points showing up at all on my map. Below is my attempt.. any help would
be appreciated.
Hailey
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sldStyledLayerDescriptor.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">
<NamedLayer>
<Name>Attribute-based point</Name>
<UserStyle>
<Title>GeoServer SLD Cook Book: Attribute-based point</Title>
<FeatureTypeStyle>
<Name>Large</Name>
<Rule>
<TextSymbolizer>
<LabelPlacement>
<PointPlacement>
<AnchorPoint>
<AnchorPointX>
<Literal>0.5</Literal>
</AnchorPointX>
<AnchorPointY>
<Literal>0</Literal>
</AnchorPointY>
</AnchorPoint>
</PointPlacement>
</LabelPlacement>
<Fill>
<CssParameter name="fill">#ffffff</CssParameter>
</Fill>
<Graphic>
<ExternalGraphic>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:type="simple" xlink:href="file:/home/moti.png"/>
<Format>image/png</Format>
</ExternalGraphic>
<Size>14</Size>
</Graphic>
</TextSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
On Fri, May 11, 2012 at 11:05 PM, Edward Mac Gillavry <
[email protected]> wrote:
> Hailey,
>
> Though it seems counterintuitive, use the TextSymbolizer instead. It has
> an AnchorPoint that you can specify. Use 0.5 for X (halfway along the
> X-axis of your graphic and use 0 for Y (at the bottom of your graphic).
> Indeed, the TextSymbolizer has a Graphic (typically used to render highway
> shields) that you can use to reference your external graphic.
>
> Regards,
>
> Edward
>
> ------------------------------
> Date: Fri, 11 May 2012 15:02:19 -0700
> From: [email protected]
> To: [email protected]
> Subject: [Geoserver-users] PointSymbolizer anchor
>
>
> Hi All,
> I am trying to figure out how to write PointSymbolizer SLD that anchors
> the bottom of the graphic to the point location, not the center of the
> graphic to the point location. For example, I am using a google like
> teardrop to represent my points, but the center of the graphic is where the
> image in anchored.. so the bottom of the teardrop is slightly below the
> point location. I'd like the bottom of the teardrop to be on the point
> location. I have included an image of what I currently have (top image) and
> what I'd like (bottom).
> This is my basic SLD:
> áá áá<Rule>
> á á á á áá<Name>Large</Name>
> á á á á á á<MaxScaleDenominator>160000000</MaxScaleDenominator>
> á á á á áá<PointSymbolizer>
> á á á á á áá<Graphic>
> á á á á á á á<ExternalGraphic>
> á á á á á á á á<OnlineResourceáxmlns:xlink="http://www.w3.org/1999/xlink"á
> xlink:type="simple"áxlink:href="file:/home/moti.png"/>
> á á á á á á á áá<Format>image/png</Format>
> á á á á á á áá</ExternalGraphic>
> á á á á á á áá<Size>14</Size>
> á á á á á áá</Graphic>
> á á á á áá</PointSymbolizer>
> á á á áá</Rule>
>
> Thanks in advance!
> Hailey
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference Exclusive live event will cover all the
> ways today's security and threat landscape has changed and how IT managers
> can respond. Discussions will include endpoint security, mobile security
> and the latest in malware threats.
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________ Geoserver-users mailing
> list [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users