Re: [OpenMap Users] Connecting Graphics

From: Don Dietrick <dietrick_at_bbn.com>
Date: Fri, 25 Mar 2005 10:08:59 -0500

If you set the OMGraphic.LABEL attribute on an OMGraphic with an
OMLabeler, it will always be visible. It sounds like you are just
seeing tooltips.

The com.bbn.openmap.layer.DemoLayer has examples of adding labels to
OMGraphics.

- Don

On Mar 25, 2005, at 8:48 AM, Roy Newton wrote:

> Don, Is there anyway to make the label always visible? It looks like
> it displays when I mouse over the OMGraphic (i.e. highlight())
>
> -Roy Newton
>
> Don Dietrick wrote:
>
>> Actually, OMGraphics were modified (in 4.6.1 I think) to have
>> setAttribute(key, object) and getAttribute(key), so you can associate
>> as many objects as you want with an OMGraphic.
>>
>> The setAppObject(...) is still there and still works, the
>> setAttribute(...) calls work with it, which is why it may have gone
>> unnoticed.
>>
>> In OpenMap 4.6.2, labeling has been added to OMGraphics, too, if you
>> use set an OMLabeler object on an OMGraphic using the OMGraphic.LABEL
>> key.
>>
>> - Don
>>
>> On Mar 24, 2005, at 4:33 PM, Andrew Hnatiw wrote:
>>
>>>
>>> Each OMGraphic has a "setAppObject()" method that allows you to
>>> associate an object with that graphic. I think that at some point
>>> Don recommended using this to associate labels to an object. I do
>>> this by setting the application object for a graphic to be a label
>>> and for the label to be the graphic it is associated with. Then, I
>>> overrode the generate() method of the label (your alert) to draw the
>>> label based on where the application object associated to it is. I
>>> think this could solve your problem. Only catch is that you can
>>> only have one application object associated with each OMGraphic...
>>> of course you could make that object an OMGraphicList to associate
>>> more than one graphic.
>>>
>>> hth,
>>> Andy
>>>
>>> Andrew Hnatiw, Software Engineer
>>> RAYTHEON
>>> 7700 Arlington Blvd
>>> Falls Church, VA 22042
>>>
>>>
>>>
>>>
>>>
>>> "Chris Allport" <chris.allport_at_red-inc.us>
>>> Sent by: owner-openmap-users_at_bbn.com
>>>
>>> 03/24/2005 11:22 AM
>>>
>>> Please respond to
>>> <chris.allport_at_red-inc.us>
>>>
>>>
>>>
>>> To
>>> "OpenMap Users" <openmap-users_at_bbn.com>
>>>
>>> cc
>>>
>>> Subject
>>> [OpenMap Users] Connecting Graphics
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> My application has objects moving around on a map. Once in a while,
>>> alerts
>>> will come in for an object and this alert should be displayed at
>>> some
>>> position offset from the object. When the object moves, the alert's
>>> position should be updated (relative to the object).
>>>
>>> Does OpenMap currently have any support for this type of
>>> functionality? If
>>> not, I shall attempt to contribute this capability if you think it
>>> might be
>>> welcome.
>>>
>>> Thanks in advance-
>>>
>>> Chris
>>>
>>> --
>>> Chris Allport
>>> Unmanned Systems Research & Development Lab
>>> Patuxent River Naval Air Station
>>> Phone: (301) 904-5943
>>>
>>>
>>> --
>>> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
>>> with the following text in the BODY of the message "unsubscribe
>>> openmap-users"]
>>>
>>>
>>
>>
>> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>> Don Dietrick, dietrick_at_bbn.com
>> BBN Technologies, Cambridge, MA
>> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>
>> --
>> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
>> with the following text in the BODY of the message "unsubscribe
>> openmap-users"]
>
>


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Fri Mar 25 2005 - 10:10:00 EST

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