RE: [OpenMap Users] MapBean projection change policy

From: Rick Lane <>
Date: Wed, 11 May 2005 10:22:05 -0400


Thanks for the response; I'll look into the extraneous repaint() call.

FYI: the mouse mode I wrote does not handle the special cases where the user
clicks too close to the edge of the current projection-- in fact, it throws
an unhandled exception.


-----Original Message-----
From: Don Dietrick []
Sent: Wednesday, May 11, 2005 9:33 AM
To: Rick Lane
Subject: Re: [OpenMap Users] MapBean projection change policy

Hey Rick,

Cool effect, I like it. I haven't seen the problem you describe with
this mouse mode, but that's usually caused by a top layer calling for
a repaint() before the layer with the main background (in this case,
the ShapeLayer) is ready to paint for the new projection. So, if
the ShapeLayer was the only layer on, you wouldn't see the effect,
because the map wouldn't do anything until the layer called repaint()
on itself.

I'm thinking I may integrate this into the default NavMouseMode. :)



On May 6, 2005, at 2:09 PM, Rick Lane wrote:

> I've resolved this earlier issue, however one still remains: for some
> reason, after the last frame of animation, and before the new
> projection is
> displayed, I'm getting a flicker of blue (as if the ShapeLayer is
> not yet
> prepared to draw, and so the only thing that gets rendered, at
> first, is the
> blue "ocean").
> I've attached the mouse mode I wrote to get the animation effect,
> and anyone
> is free to use it as they wish-- I'm hoping that someone will be
> able to see
> the "flicker" I'm talking about and give me some suggestions on how
> I might
> be able to fix it. Currently, when you use the NavMouseMode
> supplied with
> OpenMap, and you zoom in, there is no blue flicker-- this is
> exactly what I
> would like to happen.
> Thanks in advance,
> Rick
> -----Original Message-----
> From: [mailto:owner-openmap-
>] On
> Behalf Of Rick Lane
> Sent: Friday, May 06, 2005 10:24 AM
> To:
> Subject: [OpenMap Users] MapBean projection change policy
> Greetings. I'm looking for a way to temporarily turn off the
> MapBean's
> behavior of automatically redrawing each layer when the projection
> changes.
> This is because I'm doing an animation (the user clicks on a region
> on the
> map and the animation makes it look like you're zooming down to
> that area).
> To do this, I draw to the MapBean's graphics context, however in the
> background, while the animation is occurring I want to update the
> projection
> such that it equals the same projection that the "zoom" animation
> took us
> to. I currently have it working nicely, however I get a flicker
> effect
> because as I'm animating, the MapBean is telling all the layers to
> repaint
> because of the update in projection. I was hoping for a way to
> disable the
> MapBean's auto-repaint policy, but I'm not too familiar with the
> ProjectionChangePolicy class-- if that's even the right place to look.
> Any help is appreciated.
> Rick
> --
> [To unsubscribe to this list send an email to ""
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]
> <>

[To unsubscribe to this list send an email to ""
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed May 11 2005 - 10:26:40 EDT

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