Re: Example on how to animate a Location object?

From: Don Dietrick <dietrick@bbn.com>
Date: Tue Mar 12 2002 - 13:21:03 EST

Hi Ed,

OpenMap does not provide built-in support for this, but that's something
you could easily do.

If you use an OMGraphic to represent your object, you will have to
regenerate() it with the current projection so it knows how to draw
itself when called. That should be done before you call repaint() on
the layer. You can add any method you need to your layer to access your
OMGraphics from another object or thread, and then take care of the
regeneration and calling repaint() for you.

The DayNightLayer is an example of how a javax.swing.Timer is used to
update an OMGraphic (that represents the dark side of the earth).

Hope this helps,

Don

On Tuesday, March 12, 2002, at 10:00 AM, Ed MacKerrow wrote:

> I am new to OpenMap and have been able to statically add objects to the
> OpenMap display, now I would like to animate an object(s) on the
> display.
> In my simulation I will be changing the (lat, lon) dynamically and would
> like to see the movement of this object on the map. Does OpenMap
> provide a
> "built in" listener support that will repaint the layer once the
> object's
> lat or lon is changed? Are there any examples of that show how this is
> done?
>
> Thanks for the help
>
> -ed
>
>
>
>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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 Tue Mar 12 13:21:16 2002

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:32 EDT