[OpenMap Users] BufferedLayerMapBean and background layers

From: Pete Flugstad <pete.flugstad_at_gmail.com>
Date: Mon, 22 Nov 2010 15:19:28 -0600

Hello,

I've got a fairly basic app that uses OpenMap and the default
BufferedLayerMapBean.
It's got a number of map layers that are static (they only change when
the projection
changes - user zooms or pans), that I've set the background property
on. I see them
added as background layers to the BufferedLayerMapBean (via debugging output).

I've got another dynamic layer that I update from my application,
which is not a background
layer. It's got a number of icons and other things on it that can
update at various rates
(I peg the repaint at 1Hz). When the dynamic layer repaints, it
calls Layer.repaint,
which gets it's parent MapBean (the default BufferedLayerMapBean),
marks it as dirty
(MapBean.setBufferDirty(true)), then calls repaint (MapBean.repaint)
on it. However,
BufferedLayerMapBean, which because it's been marked as dirty,
re-renders all the
background layers.

What I expected to happen is that my dynamic layers update, the BufferedLayer
would just reuse the already-rendered background layer, so that I
would avoid a lot
of repainting of my background layers. A change in projection would mark the
BufferedLayer as dirty, causing it to repaint, but a change to a
non-background layer
should not. Isn't that what is supposed to happen?

Do I need to somehow instantiate a different MapBean for my dynamic layers?
Or should my dynamic layers not call repaint? I'm thinking I'm
missing something
somewhere.

Note: I'm using the beta OpenMap from SVN.

Thanks,
Pete

--
[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 Mon Nov 22 2010 - 16:20:44 EST

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