Re: [OpenMap Users] How to animate OMGraphic and/or make AnimationTester class running

From: Don Dietrick <dietrick_at_bbn.com>
Date: Fri, 1 Jun 2007 08:57:27 -0400

You would call doPrepare() on the OMGraphicHandlerLayer (your
extended version of that class). The DemoLayer is a better example
of how you should model your layer, just look at the prepare() method
and follow the logic in there for managing a list, and creating the
list the first time around. You can manage your OMCircle coordinates
in a different method, and call doPrepare() in that thread. doPrepare
() launches a new thread to call prepare() and repaint().

- Don


On Jun 1, 2007, at 8:48 AM, Christophe Ganivet wrote:

> Err, sorry but doPrepare on which object ?
> The **com.bbn.openmap.Layer object or OMGraphic don't have a
> doPrepare() method...
>
> BR
> Christophe
>
> **Carsten Ø. Madsen a écrit :
>> Hi
>>
>> Try calling doPrepare instead of repaint on the layer after
>> modifying the coords of the circle.
>>
>> BR
>> Carsten
>>
>> Christophe Ganivet wrote:
>>> Hi all,
>>>
>>> I'm learning OpenMap for a few weeks and for some "basics" I've
>>> no trouble (displaying static data for instance).
>>> But now I'm trying to move a simple OMCircle (north, south, east
>>> and west) using keyboard and i fail.
>>> My OMcircle doesn't be "refresh" into the layer.
>>> I'm extending the com.bbn.openmap.Layer class with an
>>> OMGraphicList member (i'm copying what i've seen in provided
>>> example (Simple2.java and RouteLayer.java).
>>> When my OMCircle need to be moved, i only update its coordinates
>>> and then call repaint() on the layer.
>>> But this doesn't make my circle to be updated. If i zoom or span
>>> the map it is refresh at the good new coordinates.
>>> I've also seen in mailing list archive that some people are using
>>> a GraphicLoader. I've try to see the AnimationTester class but i
>>> don't succeed make it run in a short sample program.
>>> Can anyone help me ?
>>> Thanx
>>>
>>> Christophe
>>>
>>> --
>>> [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"]
>>
>
> --
> [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 Jun 01 2007 - 08:57:36 EDT

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