[mapserver-dev] Setting custom label position order...
Lime, Steve D (MNIT)
steve.lime at state.mn.us
Fri May 26 12:11:37 PDT 2017
It's easier to supply cause/effect images with LABELCENTER. Here's a sample with 2 layers:
http://maps1.dnr.state.mn.us/cgi-bin/mapserv72?map=/usr/local/mapserver/apps/test/labelcenter/test.map&mode=map
The green circle is the feature point in both cases. The only difference in the style definition for the red circle is the GEOMTRANSFORM.
Steve
-----Original Message-----
From: mapserver-dev [mailto:mapserver-dev-bounces at lists.osgeo.org] On Behalf Of Jeff McKenna
Sent: Friday, May 26, 2017 10:48 AM
To: mapserver-dev at lists.osgeo.org
Subject: Re: [mapserver-dev] Setting custom label position order...
LABELCENTER makes sense. Steve since you have this working locally,
producing test map images, when you are ready to add this into the code
can you also send me the sample mapfile and data? I'd like to start
including map images into the documentation, as examples. -jeff
On 2017-05-26 12:42 PM, Lime, Steve D (MNIT) wrote:
> 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