Layer repaint problem

View: New views
3 Messages — Rating Filter:   Alert me  

Layer repaint problem

by JayDub :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi guys.. I'm trying to optimize the postgis layer that I was shown to me a little earlier. There seems to be some repaint problems. When all other layers are repainted on the map (after a pan or zoom), the postgis layer disappears, then re-appears in the old position, then appears in the right place.

I'm not sure where to start looking. RenderPolicy perhaps? Any suggestions will be welcomed.

Re: Layer repaint problem

by Don Dietrick-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi JayDub,

Try using a ListResetProjectionChangePolicy. What's happening is that  
the old list is still being held by your layer while it's talking to  
the database, and if the map gets painted for another layer, your  
layer renders what it has. The LRPCP will clear out the list right  
away, since you'll be replacing the list later.

Hope this helps,

-- Don

On Sep 3, 2009, at 9:28 PM, JayDub <justcallmejay@...> wrote:

>
> Hi guys.. I'm trying to optimize the postgis layer that I was shown  
> to me a
> little earlier. There seems to be some repaint problems. When all  
> other
> layers are repainted on the map (after a pan or zoom), the postgis  
> layer
> disappears, then re-appears in the old position, then appears in the  
> right
> place.
>
> I'm not sure where to start looking. RenderPolicy perhaps? Any  
> suggestions
> will be welcomed.
> --
> View this message in context: http://www.nabble.com/Layer-repaint-problem-tp25286812p25286812.html
> Sent from the OpenMap mailing list archive at Nabble.com.
>
> --
> [To unsubscribe to this list send an email to "majdart@..."
> with the following text in the BODY of the message "unsubscribe  
> openmap-users"]

--
[To unsubscribe to this list send an email to "majdart@..."
with the following text in the BODY of the message "unsubscribe openmap-users"]

Re: Layer repaint problem

by JayDub :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Okay... just wanted to think out loud before I actually gave a shot @ trying this. I notice that the conversion process in postgis (converting the bytes to geometries) takes QUITE a bit of time. I think time could be saved by only removing the graphics that are "dirty" so to speak and only add the new graphics based on what is not currently being shown.

This would be great for:
 - small movements.. panning along and so on

This gets complicated though when you start talking about zooming... because unless the graphics can be nicely resized and repositioned... they're just as good as dirty.

So the question is do you think that a heuristic based repaint (based on projection changes) will be in turn faster than a whole graphic repaint each time?

Don Dietrick-2 wrote:
Hi JayDub,

Try using a ListResetProjectionChangePolicy. What's happening is that  
the old list is still being held by your layer while it's talking to  
the database, and if the map gets painted for another layer, your  
layer renders what it has. The LRPCP will clear out the list right  
away, since you'll be replacing the list later.

Hope this helps,

-- Don

On Sep 3, 2009, at 9:28 PM, JayDub <justcallmejay@gmail.com> wrote:

>
> Hi guys.. I'm trying to optimize the postgis layer that I was shown  
> to me a
> little earlier. There seems to be some repaint problems. When all  
> other
> layers are repainted on the map (after a pan or zoom), the postgis  
> layer
> disappears, then re-appears in the old position, then appears in the  
> right
> place.
>
> I'm not sure where to start looking. RenderPolicy perhaps? Any  
> suggestions
> will be welcomed.
> --
> View this message in context: http://www.nabble.com/Layer-repaint-problem-tp25286812p25286812.html
> Sent from the OpenMap mailing list archive at Nabble.com.
>
> --
> [To unsubscribe to this list send an email to "majdart@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@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]