|
From: Jody G. <jod...@gm...> - 2009-09-09 11:55:03
|
On 09/09/2009, at 6:07 PM, jv wrote:
> You both really rock :-) I don't know if I will be able to find my
> way around the api but knowing you're so active in the mailing list
> really makes me think this project has a cool future.
You did arrive exactly when we needed you - ie when we are needing
feedback on style usability. So in that sense we both lucked out.
> I know part of my problem is that I don't have enough background
> information (for example, I mix the concept of style and actual
> symbol on map placed at a determined coordinate).
Not sure I understand the difference?
> So don't take the next code very seriously, but I hope somebody will
> find it interesting: it creates layer from a series of coordinates
> placing a polygon of the indicated size for each xy pair. Depending
> of a parameter call fiability the color of the polygon changes.
> private Fill createFillByFiability(StyleBuilder builder, Color
> color, Fiability fiability) {
> Fill fill;
>
> switch (fiability) {
> case DISAPPEARED : fill = builder.createFill(Color.BLACK, 0.33);
> break;
> case SURE : fill = builder.createFill(Color.GREEN, 0.33); break;
> case UNSURE : fill = builder.createFill(Color.ORANGE, 0.33); break;
> case UNKNOWN : fill = builder.createFill(Color.BLUE, 0.33); break;
>
> default: fill = null;
> }
Yeah okay. You are doing conditional logic in java code; which is fine
- however if "fiability" was an attribute in your feature we would
rather you set up a series of "Rules" one for each case; each with its
on Symboliser.
I had a little trouble reading through your code (so I may of not
understood what you were doing very well).
Jody
|