Re: Animating on a layer

From: Don Dietrick <dietrick@bbn.com>
Date: Tue Feb 26 2002 - 13:57:28 EST

Hi Chris,

I think I misunderstood what the problem was, and looking at your code
again, I don't really see a problem with it (I would still call generate
in the timer thread, though).

I'm not sure what the behavior is for the URLRasterLocation is if the
raster isn't loaded. I'd imagine that it should work the same as a
regular location, putting the dot there with its label. Are you saying
that you are getting the dot and label, and when iterate() is called, it
disappears? or not moves?

- Don

On Tuesday, February 26, 2002, at 01:13 PM, Chris Hopkins wrote:

>
> Interesting to note...if I change to just using an OMPoint object, it
> *does*
> move. One thing to note as well is that I'm not able to load the uav.gif
> properly as I don't have it in the right place for openmap to find it.
> So, I
> don't know if the fact it can't load the specified graphic plays into
> anything. If I use the URLRasterLocation, I get a dot with UCAV1 next
> to it.
>
> - Chris
>
>> -----Original Message-----
>> From: Don Dietrick [mailto:dietrick@bbn.com]
>> Sent: Tuesday, February 26, 2002 12:49 PM
>> To: Chris Hopkins
>> Cc: openmap-users@bbn.com
>> Subject: Re: Animating on a layer
>>
>>
>> Hi Chris,
>>
>> Simple fix -
>>
>> On Tuesday, February 26, 2002, at 12:23 PM, Chris Hopkins wrote:
>>
>>
>>
>>> urlrloc.setLocation(newlat, newlon);
>>
>> urlloc.generate(cur_proj);
>>
>>> repaint();
>>> }
>>>
>>
>>
>> When an OMGraphic changes position, it needs to be generated with the
>> current projection so it knows where to draw itself later.
>>
>> Cheers,
>>
>> Don
>>
>>
>>> public void projectionChanged(ProjectionEvent e)
>>> {
>>> cur_proj = e.getProjection();
>>> urlrloc.generate(cur_proj);
>>> }
>>>
>>> public void paint(java.awt.Graphics g)
>>> {
>>> System.out.println("\npainting...");
>>> System.out.println("Location is " + urlrloc.lat + "," +
>>> urlrloc.lon);
>>> if(cur_proj != null)
>>> {
>>> System.out.println("generating graphic...");
>>> urlrloc.generate(cur_proj);
>>> }
>>> urlrloc.render(g);
>>> }
>>> }
>>>
>>> --
>>> [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"]
>>>
>>>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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"]
>

--
[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 Feb 26 13:57:59 2002

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