Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Tiled Rendering and Mapgraphics Again

Hey Jody,

What I have done is update the Mapgraphic Renderer to render the entire viewport onto a single image. This image is then stored on the layer blackboard and used when rendering tiles. When the tile comes along to render the mapgraphic the image is taken off the blackboard and the part that matches the tiles bounds are clipped and drawn.

In order to make this work; when the mapgraphic context is created a viewport listener is added to the map so when the viewport bounds change the image cached on the layer's blackboard is cleared.

The issues with the styling is not that layer.refresh() is not being called but rather that this doesn't cause my "cached" mapgraphic image on the blackboard to be cleared.

A simple solution would be do not cache this image; but I can't imagine that would be very good performance wise as it would be rendering the image multiple times.

I could add another listener that listeners for style events and clears the cache.

Or maybe I could store information about the styles with my cached image and if they have changed then refresh the cached mapgraphic.

Emily


Jody Garnett wrote:
Hi Emily.
On Thu, Mar 5, 2009 at 9:48 AM, Emily Gouge <egouge@xxxxxxxxxxxxxxx> wrote:

The ongoing issue of tiled rendering and mapgraphics is causing me issues
again so I'm working on a solution.  (The mapgraphics currently don't render
properly if using tiled rendering).


Good to hear you making progress on this; when you have a moment I am
interested to hear what approach your solution is taking.

I currently have a solution that works most of the time.  The only thing it
doesn't do properly right now is refresh when the style is changed.


Interesting. So the style changing would change the layer blackboard which
would fire an event (or EMF Notification?). From their we need to check to
see who is listening and make sure they issue a layer.refresh( null ) event?

I'm wondering if somebody can review my proposed changes and provide me
with some feedback and ideas for dealing with the style change issue I'm
having.  If somebody is willing to review the code I'll pass it along to
them.


I have a bit of a backlog on uDig items right now; so I cannot in good faith
volunteer at this time (I still owe Anrdrea a style save api).

Jody



------------------------------------------------------------------------

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel


Back to the top