Re: [OpenMap Users] BufferedLayerMapBean and background layers

From: Don Dietrick <dfdietrick_at_gmail.com>
Date: Tue, 23 Nov 2010 10:10:53 -0500

Hi Pete,

Thanks for writing - I did some checks, and saw what you were seeing.
That behavior is not what was intended, what you thought should happen
should have been happening.

I've made a modification to the BufferedLayerMapBean, essentially
getting rid of the overridden setBufferDirty method. It restores the
expected behavior, and I can't find any side-effects with testing
other layer combinations.

Those changes should show up in the repository sometime today.

One of the reasons I hadn't noticed this is because I've been using
BufferedImageRenderPolicies on my heavy layers, and that reduces the
burden of rendering for heavier layers, in and out of the
'background'.

Thanks again,

Don

On Mon, Nov 22, 2010 at 4:19 PM, Pete Flugstad <pete.flugstad_at_gmail.com> wrote:
> 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"]
>

--
[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 23 2010 - 10:11:53 EST

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