Description
I found that it's convenient to use the geometryFunction option to set classes on the root map-(point,line etc) element. I am thinking that there should be other callback opportunities (I believe there is the possibility to provide a function for the caption
and properties
options, but I didn't experiment with them yet).
One such callback could be a feature
(callback) option, which would give you the opportunity to post-process the <map-feature>
to say, add class
values and whatever else. You could pass it the javascript feature by default for convenience, so you could derive class values from readily available javascript properties. This would be more efficient that first setting classes on a geometry root element and then having to post-process the feature to copy/move the classes from there to the <map-feature>
element, for example. Also, it could be an opportunity to fire an event, etc.
Ideas below!