I had asked this question in the WebAPI Support but have since switched back to MVC.
Is there a way to rotate a label on an individual basis. I have an annotations layer with a column of doubles dedicated for the angle (0-359). These labels go along the outer lines of the polygon and need to be angled appropriately. Also there is a column for font size which I will need to do similar to the angles. Any help would be appreciated.
Emil had suggested some links to a Services Edition Sample, but the override doesn’t seem to work the same way in MVC.
Which contains the customTextStyle inherit from our textStyle, that’s contained in our core code, which is the same both in MVC edition and WebAPI edition.
So I want to double check the detail information and we can suggest you how to solve it.
a typical value is as follows:
canvas.CurrentWorldExtent = -10780572.503912,4724900.1173184,-10780070.885932,4724630.7962368
feature = (polygon feature)
canvas.Width = 1680.0
canvas.Height = 902.0
The polygon feature looks like it is coming across correctly with correct column values (5 column values - Text, Size, Angle, Color, Font). Just for whatever reason the ScreenPointF will fail. The values are coming from a filegeodatabase not a shapefile.
Ok, so I’ve gotten all of the values to rotate correctly but they will only appear if I put in values for the ScreenPointF. Such as changing the below line of code:
ScreenPointF textScreenPoint = new ScreenPointF(500, 500);
Changing the line is the only way I am able to view the layer, otherwise it will crash the layer. Obviously this isn’t helpful to our map because all of the values overlap each other and are not readable. So something is going on with either the extent or the extenthelper.
By the way I’m running MapSuite 9.0.0.180. And the MapUnit is GeographyUnit.Meter.