Hi christian,
I had the same problem not a long time ago. If your lines are not all
straight lines you cannot just get all their coordinates. What I suggest
you is to create another shapeFile in the case you use EsriLayers which
contains points. The latter represent the extremities of the (straight)
lines where you want to put your labels. (It is easier to get the
coordinates of the points then to extract all the needed coordinates from
the OMLine) And finally you will be able to calculate your slope and the
angle with which you want to rotate the label. Indeed, you need to use
OMText.setRotationAngle().
N.B.: It works fine but not perfectly.
Hope it helps.
Good luck.
-- Molato Badr christian.weaves@robresint.co.uk wrote: > Hello, > > Is there a way to calculate the angle of a line from the horizon based > on the start and end points of the line tie, > > I have an OMLine object. I have calculated the center point of the line. > I add an OMText object at this point but the text appears horizontal. I > need to set the OMText.setRotationAngle(??) so the text follows the same > angle of the line. > > Any ideas? > > Your help is muchly appreciated! Thanks for bailing me out (again)..... > > chris.. > > -- > [To unsubscribe to this list send an email to "majdart@bbn.com" > with the following text in the BODY of the message "unsubscribe openmap-users"] > > -- [To unsubscribe to this list send an email to "majdart@bbn.com" with the following text in the BODY of the message "unsubscribe openmap-users"]Received on Fri Nov 28 05:56:56 2003
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:37 EDT