Andrea,
The following is what I'm trying to do:
In the toolbar i created a JCheckbox named 0_name
I do a split on the 0_name with the layer as 0 index in the mapLayer and
the TextSymbolizer defined name as name
I define a PointSymbolizer and TextSymbolizer for the Layer 0 in my
MapContext
What I'm trying to do is if I click the JCheckbox the label defined by
my TextSymbolizer turns on. If I deactivate the checkbox the label
disappears.
So think of 3 points on the screen with no Label.
If you click the JCheckbox on/checked the labels appear. Lets say 3
points with the label L1, L2, and L3
If you click the JCheckbox off/unchecked the labels disappear.
The labels of course are defined as an attribute at FeatureCollection
creation.
The code currently works but it seems really forced. This seems like a
good idea avoiding repopulation of the FeatureCollection and just a
manipulation of the style via the rules and symbolizer
Also then I don't have multiple layers - 1 layer for the points, and
another layer for the label(L1, L2, L3)
Basically I want to manipulate a layers displayed content by clicking
JCheckbox.
I look forward to hearing back from you.
Oliver
Andrea Aime wrote:
> Oliver Gottwald ha scritto:
>>
>> Hi,
>>
>> Is the only way to make a rule inactive to remove it from the Rule
>> List by creating a new Rule List????
>
> I read your mail, looked at your code, but honestly I don't understand
> what is it that you're trying to do :-)
>
> Can you step back from the "remove rule from the list" issue and tell
> us what are you actually trying to do (what is the problem you're trying
> to solve)
>
> Cheers
> Andrea
>
|