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
> * @param omg The Object beeing labeled
> */
> public void setLabeledObject(OMGraphic omg);
>
> /**
> * Get the Object beeing labeled by this OMLabeler
> * @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.
Regards,
Don
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick@bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-- [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 Wed Jan 31 12:00:39 2007
This archive was generated by hypermail 2.1.8 : Wed Jan 31 2007 - 12:00:41 EST