[udig-devel] Positioning text with LabelPlacement
Cory Horner
chorner at refractions.net
Thu Mar 8 09:37:25 PST 2007
tony.roth at GMX.de wrote:
> Hi list,
> two questions about putting text to a feature in the map:
>
> i) I'm using a Textsymbolizer object, which is positioned by a
> LabelPlacement. The problem is, that the position is fixed and
> independet from the position of the object in the map. Sometimes it is
> near the left or right edge of the map and the text is
> truncated especially if you have long attribute values. I can calculate
> the position of the Textsymbolizer depending on text length and relative
> position to the viewpane but ... no.
> Is it somehow possible in UDIG to generate a "floating" Textsymbolizer
> object which is positioned by the Rendermanager?
Tony, this doesn't sound right. What geometry type are your features,
and what SLD snippet are you using? Usually text is positioned as a
proportion of the text length, with 0 being right-aligned, 1 being
left-aligned, and 0.5 being the midpoint (for points at least). Offsets
can also be applied.
> ii) In the project I'm involved in, we use the Textsymbolizer to inform
> the user about certain feature attributes. More convenient for the user
> would be something like an onmouseover effect which opens a tool tipp if
> the mouse position is next to a feature (of a certain layer). Is
> something like this existing in Udig itself or in related projects?
This doesn't exist -- a good idea though! When should the tool tip
appear? Only when a certain tool is selected (like the info tool), or
anything? (the latter being more difficult)
Cory.
More information about the udig-devel
mailing list