Re: [OpenMap Users] MapBean and paning

From: Tore Halset <halset_at_pvv.ntnu.no>
Date: Thu, 28 Oct 2010 10:26:28 +0200

Hello.

All of the layers now use ListResetPCPolicy, I switched to the new OMMouseMode and I updated my polygon layer to not reuse or save the OMGraphicList. It looks like this solved my panning problem! Thanks a lot!

 - Tore.

On Oct 27, 2010, at 15:55 , Don Dietrick wrote:

> Hi Tore,
>
> It sounds like what is happening is one of the layers is responding to
> the projection change very quickly and calling for a repaint before
> another layer has a chance to update itself for the projection change.
> I'm assuming that one layer is drawing things in the new projection
> and another is drawing things for a moment in the old projection.
>
> If the layer drawing things in the old projection is using the
> StandardProjectionChangePolicy, that might make the effect more
> pronounced. The StandardPCPolicy reuses the same OMGraphicList and
> just calls generate() on it with the new projection. If the layer is
> stilll working on updating the list with new OMGraphics when that
> first repaint gets called by the other layer, the old OMGraphics get
> rendered.
>
> Switching to a ListResetPCPolicy clears the layer's list as soon as it
> receives a projection change notification, so the layer won't draw
> anything if the map gets painted while it is working. You'll want to
> make sure that the layer is creating a new OMGraphicList object to
> return from the prepare() method when doing this (good practice
> anyway).
>
> Have you tried the new OMMouseMode? It's a combination of the
> SelectMouseMode and PanningMouseMode.
>
> Hope this helps,
>
> Don
>
>
> On Wed, Oct 27, 2010 at 9:00 AM, Tore Halset <halset_at_pvv.ntnu.no> wrote:
>> Hello.
>>
>> I am currently using a the normal MapBean in an swing application. It has some shape layers set as background and a overlay with the application specific polygons. On a mac, panning is nice. On windows, the map jumps back and forth after the panning. This flickering does not take long time, but it does not look nice.
>>
>> Changing PanMouseMode to use GraphicsConfiguration#createCompatibleImage to create the image buffers improved the situation slightly. Or nothing at all.
>>
>> Switching from MapBean to BufferedMapBean got the situation worse.
>>
>> Is there any other thing to try out to improve the panning in my app? This is all on openmap svn trunk.
>>
>> - Tore.
>>
>> --
>> [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"]
>

--
[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 Thu Oct 28 2010 - 04:28:08 EDT

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