[udig-devel] problems in style & rendering of mapgraphics
Jesse Eichar
jeichar at refractions.net
Wed Feb 13 11:46:46 PST 2008
Hi Andrea,
2 things:
1. I have found that the StyleConfigurator extension point is easier
to use.
2. The layer that you have access to through the StyleConfigurator is
a decorator so you can get its style blackboard and styles and hack at
them as much as you want and the "real" layer won't be affected until
you hit apply.
The consequences of 2 is that you can update the style directly when a
UI widget is modified and not worry about redo/undo because the
framework will hand that for you.
Why don't you look at LocationStyleConfigurator for a simple example.
Jesse
Le 13-Feb-08 à 11:37 AM, andrea antonello a écrit :
> Hi, I have an odd problem I can't understand completly:
>
> - I have a style configuration page for my mapgraphic. Inside that
> nice page I set a lot of nice things of my style object.
> At the moment I press "apply", inside a preApply method I set all the
> values properly to be sure everything is ok in the style object and
> then put the style object into the styleblackboard.
> When I leave the method, the object is safe in the blackboard.
>
> - the apply forces the related mapgraphic to redraw, which is what I
> in fact want, but here the problem happens:
> Inside the draw method of the mapgraphics, I get the style object from
> the styleblackboard, but the style object is null. The entry is there,
> but the style obj is null.
> If I press apply some more times, finally the style object seems to be
> back from NIrvana and the mapgraphics is drawn properly
>
> I don't understand exactly what happens in the middle. Is there a
> delay between the putting the object on blackboard and being able to
> retrieve it back from it?
>
> Andrea
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
More information about the udig-devel
mailing list