I am using GeoServer to produce various layers including points, line and polygons etc. For the map styling CSS code has been used instead of SLD, everything has worked perfectly up until the last point that I need to style. The data in question is about boundary responsibility for a property and each responsibility for that boundary is defined by a letter for example responsibility_number which is number 1 would be defined by the letter 'T' and then would need to be rotated at 120 degrees and then responsibility_number which is defined by number 2 but the same letter is 'T' then needs to be rotated at 45 degrees and so on.
I am trying to get the point to rotate based on a column called text_rotation which has different angles in degrees for each point that needs to be rotated based on that specific angle. I have searched high and low on the internet, stackoverflow and stackexchange but can't see any solutions. I have also tried different codes of CSS but nothing seems to work here are my examples so far.
Example 1
[responsibility_number = '1'] {
label: [responsibility_text];
font-fill: red;
font-family: Arial;
font-size: 12;
font-weight: bold;
label-rotation: [text_rotation];
}
Example 2
[responsibility_number = '1'] {
label: ['T'];
font-fill: red;
font-family: Arial;
font-size: 12;
font-weight: bold;
label-rotation: [text_rotation];
}
Example 3
[responsibility_number = '1'] {
label: [responsibility_text];
label-rotation: -157;
label-offset: 0 25;
font-fill: red;
font-family: Arial;
font-size: 12;
font-weight: bold;
}
Example 4
[responsibility_number = '1'] {
label: ['T'];
label-rotation: -157;
label-offset: 0 25;
font-fill: red;
font-family: Arial;
font-size: 12;
font-weight: bold;
}
I can't understand why the T's don't rotate at all I have also tried using mark-rotation, rotation and label-rotation and also tried to use label-offset to force the placement of the label but that doesn't work.
Also I hope this question is okay as its the first time posting :)