Re: [OpenMap Users] Whats the right way to rotate a label

From: Don Dietrick <>
Date: Sun, 28 Jan 2007 12:08:24 -0500

Hi JR,

On Jan 26, 2007, at 2:35 PM, JR Andreassen wrote:

> Hi...
> I'm back to trying to rotate Text labels to follow a OMGraphic.
> What is the correct way to get it done?

You can figure out the points you want the text to align itself with,
and then find the azimuth between them using the
com.bbn.openmap.proj.GreatCircle class method.

> Any samples anywhere ??

No, none in the OpenMap package itself.

> My goal is to put in Road/Street names, but make it follow a segment.
> Also, at the same time I can ask the question again
> What are the possibilities of adding a couple of methods to the
> OMLabeler interface.
> /**
> * Set the Object beeing labeled by this OMLabeler
> * _at_param omg The Object beeing labeled
> */
> public void setLabeledObject(OMGraphic omg);
> /**
> * Get the Object beeing labeled by this OMLabeler
> * _at_return OMGraphic The Object beeing labeled
> */
> public OMGraphic getLabeledObject();
> It would convinient for the labler to know what it was labeling.
> We could find the size the Graphic beeing labeled, was smaller than
> the Label.
> Don't label(Until it was)
> .In the case of roads or other plylines you can find out the path
> and label along it
> (Hopefully. I'm currenty trying to acomplish that)

I can see how you would use this in an OMLabeler, but it also seems
like something a specific labeler implementation would use
internally. I think you could put these methods in any
implementation of OMLabeler, or subclass of OMTextLabeler, without
having to add them to the OMLabeler interface itself.



Don Dietrick,
BBN Technologies, Cambridge, MA

[To unsubscribe to this list send an email to ""
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Sun Jan 28 2007 - 12:13:40 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:08 EDT