Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Label frame offset with leader line #5326
When using the LEADER for point labels, the GEOMTRANSFORM 'labelpoly' frame around the label gets an offset both vertically and horizontally. See the image below where the bottom-left label has a leader, but the green frame is moved a few pixels down and to the right. The label which rendered without a LEADER has the correct frame around it.
Here is a section of my mapfile for the relevant layer:
Here it is, data and mapfile:
I call it with:
It produces an image like below, see Brussels, Denver and Oslo for example:
I have noticed a workaround, and that is to not use "POSITION auto" for the LABEL. If I instead use "POSITION lc", the result is:
And that looks correct with respect to the label frame. Now, I just need to find a way to make the leader and label look connected, without using "POSITION cc", since that won't really look good for labels without leader as they would hide the feature. :)
I've attached a fix for this. There was also a bug on the offseted label computations, as in your example the red symbol should also be offseted instead of remaining on the original position.