[mapserver-users] trying new label positioning - no change
woklist at kyngchaos.com
Wed Feb 18 01:54:40 EST 2009
On Feb 18, 2009, at 12:15 AM, Steve Lime wrote:
>> I did notice when poking around in the source that the labelling
>> routines didn't know about the geometry of individual features. In
>> own early (v4.4) attempts at reordering the positions for polys
>> (before the recent changes) I added a parameter to the addlabel()
>> functions to pass the shapetype.
> I think I'd just pass a shapeObj pointer to the msAddLabel() and
> what is necessary: type and a few indexes.
If you think this is something that can be done, it would be nice have
geometry and annotation layers both use the same positioning rules
based on the geometry type (see comments below).
>> I'm not sure what you mean here - how does label priority invalidate
>> annotation layers?
> The principle reason to use annotation layers was to control the
> order in
> which labels are stuffed into the cache. They were especially useful
> polygons since you typically draw those first but if you want to
> labels then you'd have to use annotation to make the labels show
> other stuff.
> Label priorities fix that. You can give a polygon layer high
> priority labels
> without having to resort to annotation layers later in the mapfile.
> The benefits
> (besides working around this bug) are two-fold:
> 1) performance, you only have to process the polygon features once...
> 2) brevity, shorter, more concise layer definitions are good...
> Certainly annotation layers are still useful but principally for
> things like
> copyright notices or road shields.
Hmm, but mixing the annotations with their geometry in a single layer
means you can't turn geometry and annotations on and off separately -
I often want to show just the feature geometry, yet be able to turn on
their annotations if I need it.
Also, what about the drawing order? Won't other feature layers then
draw on top of earlier feature layers and annotations of those
layers? Or does the label cache force ALL annotations to draw last,
no matter what layer they're on?
I guess I need a visual diagram of the [now many] various possible
combinations of layer types, annotations, priorities and layer
ordering to make sense of this.
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
"Time is an illusion - lunchtime doubly so."
- Ford Prefect
More information about the mapserver-users