[mapserver-dev] Setting custom label position order...

Lime, Steve D (MNIT) steve.lime at state.mn.us
Fri May 26 08:42:38 PDT 2017


No, you can override the default settings regardless of feature type. So, if you want to allow all 9 positions for lines you can do that. You can also just change the ordering of the positions. 

I also would like to introduce one other change - adding a new label GEOMTRANSFORM called LABELCENTER. It's the, as you might guess, center of the drawn label and is different from the LABELPNT. It works off the same data as the LABELPOLY transformation. The advantage is that the underlying point style(s) move with the label when the position is not CC. So you can have complex label/symbol at both the feature location (LABELPNT) and the label location (LABELCENTER)...

--Steve

-----Original Message-----
From: mapserver-dev [mailto:mapserver-dev-bounces at lists.osgeo.org] On Behalf Of Jeff McKenna
Sent: Friday, May 26, 2017 9:27 AM
To: mapserver-dev at lists.osgeo.org
Subject: Re: [mapserver-dev] Setting custom label position order...

No objections here, looks like a useful enhancement.  I assume that the 
same logic applies as before for lines and polys (for polygons only 
cc,uc,lc,cl,cr are accepted, and for lines only lc,uc are accepted).


-jeff



On 2017-05-25 6:09 PM, Lime, Steve D (MNIT) wrote:
> I was putzing around with a need to be able to define label position
> order within the mapfile. Mu use case was that I had markers that were
> oriented to line work and if possible I wanted to use CC and then the
> other automatic placement if collisions occurred. So I tweaked mapdraw.c
> – the label cache code to add support for syntax like so:
>
>
>
>   PROCESSING "LABEL_POSITIONS=CC,CL,CR,UC,UL,UR,LC,LL,LR"
>
>
>
> So in this case we start at CC and so on… Works well enough but probably
> needs additional parameter support to help push subsequent positions
> away from the centered marker since you’re pretty much guaranteed
> overlap with this scheme (I’m forcing in my case so messy is ok). It’s
> usable with any feature type and POSITION AUTO so folks may have other uses.
>
>
>
> Any objection to this addition? I’m not sure it’s RFC worthy…
>
>
>
> Steve
>
>
>


_______________________________________________
mapserver-dev mailing list
mapserver-dev at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-dev


More information about the mapserver-dev mailing list