[OpenMap Users] Calling Layer.repaint()

From: Dause, Stephen Howard CIV NSWCDD, K71 <stephen.dause_at_navy.mil>
Date: Tue, 30 Nov 2010 17:46:02 -0500

Hello everyone,

I've been having difficulty getting my layer to properly refresh itself when I call repaint(). If my understanding is correcting, calling the repaint() method of a class which extends Layer will cause that layer to be repainted. For some reason, this is not working for me.

I have made a simple modification to the example RouteLayer.java to wait for a few seconds, modify its OMGraphicList instance, and then call repaint() on itself. Unfortunately, this does not have the desired effect: my changes to the OMGraphicList are not realized until I resize the window or interact with the map in another way (zoom in or out, etc.). This is the case even when it is the only layer being displayed.

To be clear, what I am trying to do is have a layer that changes its properties and repaints itself every so often based on data external to OpenMap (i.e., at regular intervals). For whatever reason, I can't seem to get it to repaint itself properly. Does anyone have a suggestion for what I am doing wrong, or a simple example of a layer that redraws itself every so often (independent of any user interaction)?

Thanks in advance,

Stephen Dause
stephen.dause_at_navy.mil



--
[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 Tue Nov 30 2010 - 17:56:35 EST

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