Feature and layer Style
There isn't simple method to get feature/featureCollection/layer Style.
It's necessary to improve the architecture and expose methods to obtain the style.
My suggestion:
-
FeatureCollectionhas the master style -
Featurehas its own style, with default values read from theFeatureCollectionstyle - same goes for
FeatureGeometrywhich inherits from the style ofFeature(and soFeatureCollection)
With this, only two things need to be done:
- add a
Style#clone()method - in the constructor of each of these types, add an option to initiate the style,
trueby default
Generally speaking, regarding these types, what we are also missing either a great tutorial concerning the creation of FeatureCollection/Feature/FeatureGeometry, or either a better API (it is too complicated to understand bindNewGeometry/startSubGeometry/... imho.
Can this approach is able to apply to the diffrent layers? such as vector tiles?
@am2222 what do you mean ?
Created #1924 and #1923 as followups of this issue. Closing