Some labels are not drawn - for labels along lines. More precisely: they are drawn in top-left of the picture, only a few pixels in visible range. It seams there is a bug in following code - choosing to draw label using painter.paintStraightLabel when all calculations and transformation matrix is prepared for curved one. One solution is to use painter.paintCurvedLabel(cursor) when curved variable is set. line 742 https://github.com/geotools/geotools/blob/master/modules/library/render/src/main/java/org/geotools/renderer/label/LabelCacheImpl.java#L736-L752 if (!collision) { if (labelItem.isFollowLineEnabled()) { // for curved labels we never paint in case of // overrun if ((startOrdinate > 0 && endOrdinate <= cursor.getLineStringLength())) { if (maxAngleChange < maxAngleDelta) { // if straight segment connecting the start and end ordinate is really close, paint as a straight label if (maxAngleChange == 0
cursor.getMaxDistanceFromStraightLine(startOrdinate, endOrdinate) < painter.getLineHeight() / 2) { painter.paintStraightLabel(tx); } else { painter.paintCurvedLabel(cursor); } painted = true; } } |
|