Opened 13 years ago

Closed 13 years ago

#3609 closed defect (fixed)

Label style implementation ticket

Reported by: sdlime Owned by: jmckenna
Priority: normal Milestone: 6.0 release
Component: Documentation - MapServer Version: unspecified
Severity: normal Keywords:
Cc: havatv

Description

This ticket tracks the addition of styles to label objects. The idea is to allow more flexibility when drawing markers, bboxes and so forth in addition to label text.

In the past this was done via label parameters such as background color and background shadow color or via annotation layers. In the latter case that required a second pass through data just to deal with label markers- a sometimes expensive operation.

Label styles avoid the multiple passes and allow for complex markers (e.g. road shields) to be drawn at the same time features are drawn. In addition we can replace the cumbersome background parameters with the more familiar style syntax- ultimately providing more control.

Change History (11)

comment:1 by sdlime, 13 years ago

Status: newassigned

This addition was discussed and implemented at the NYC code sprint. It is about 95% complete and is in trunk. Remaining major issue is what to do on the compatibility front. That is, do we remove the various background... label parameters in the 6.0 release. Personally I think that's a reasonable thing to do given this is a major release. On the other hand we could leave them alone and mark them as deprecated and remove them later. In either case at some point this will bite a user while upgrading and it's a question of when to inflict that pain.

I'd vote to do it now since there will be other upgrade requirements for 6.0 anyway.

comment:2 by tbonfort, 13 years ago

I'd be in favor of doing it now also

comment:3 by sdlime, 13 years ago

This will impact the new rendering code. is it enough to remove references to those parameters in maprendering.c (if-then block at lines 711-717)?

Does any of the label style drawing need to make it into the rendering API code or does it just stay in the cache drawing code in mapdraw.c?

Steve

comment:4 by sdlime, 13 years ago

Component: MapServer C LibraryMapServer Documentation

Removed background* related attributes from labelObj in r10820. Files affected were:

mapscript/php/label.c mapfile.h mapogr.cpp mapserver.h mapdraw.c maplexer.l

The file mapdraw.c saw the most substantive changes. This may bust a test or two. Specifically the mapfile LABEL paramters: BACKGROUNDCOLOR, BACKGROUNDSHADOWCOLOR and BACKGROUNDSHADOWOFFSET are no more.

Moving to a documentation ticket...

Steve

comment:5 by jmckenna, 13 years ago

taking a look at the docs...

comment:6 by jmckenna, 13 years ago

Steve I see that those background* have been removed, that makes sense to me, but can you point me to the RFC that describes this "addition of styles to label objects" change?

comment:7 by jmckenna, 13 years ago

I see a lot of these comments in the code ("/* TODO: deal with label styles here */")...are these label styles changes implemented? If yes in what ticket?

(sorry for the questions)

comment:8 by sdlime, 13 years ago

There might be a couple of TODO's but their small. I'll have a run through them. There is no RFC for this change. We documented everything on whiteboards at the NYC code sprint and implemented there. I may have to provide detail for you...

Steve

comment:9 by jmckenna, 13 years ago

hmm i had checked for notes on this on the code sprint wiki but couldn't find any details. i'll keep looking.

-jeff

comment:10 by sdlime, 13 years ago

Owner: changed from sdlime to jmckenna
Status: assignednew

comment:11 by havatv, 13 years ago

Cc: havatv added
Resolution: fixed
Status: newclosed

I think this has been fixed. Closing. Nice if someone could have a look, point out what is missing and reopen if needed.

Note: See TracTickets for help on using tickets.