If you want to switch to a different feature style when a user selects a feature, you have 2 options:
selectedflag of the
PaintStateparameter in the
paintLabelmethods of the
FeaturePainter, indicates that the feature is being rendered in the selected mode. Based on this flag you can choose to use a different style for selected features. See the Visualizing and styling feature data tutorial for an illustration.
addSelectionfunction of the
FeaturePainterUtilmodule to add selection behavior to your
FeaturePainter. Although this option limits your choices, it’s a quick and easy way to equip a
FeaturePainterwith selection behavior.