OptionalconflictWhether the labels defined by TextSymbolizers should be decluttered or not. The default value is true.
Individual TextSymbolizers can override this default behaviour by specifying a VendorOption named
"conflictResolution". For example:
<TextSymbolizer>
...
<VendorOption name="conflictResolution">false</VendorOption>
</TextSymbolizer>
OptionaldrapeThe target on which Symbology Encoding styled content will be draped.
If drapeTarget is undefined and the shape has zero Z, it will be draped on terrain.
If it has non-zero Z, it will not be draped.
OptionalfunctionYou can provide some custom function evaluators at creation time. Custom functions allow to change the style of your features based on a function.
Using custom functions requires some coding as well as some adaptations in your sld files to start using them. To illustrate this we provide a very easy function to get the length of a string below.
createPainterFromString(seSource, {
functionEvaluators: {
"lengthOfName": (name: string): number => {
return name.length;
}
}}).then(function(painter) {
map.layerTree.addChild(new FeatureLayer(model, {
painter: painter
}));
});
Using this function can be done like this:
<ogc:Function name="lengthOfName">
<ogc:PropertyName>NAME</ogc:PropertyName>
</ogc:Function>
We also provided a small set of pre-defined functions:
These functions don't require any coding, you can just use them by adding them in your sld files.
To illustrate this, below the strTrim function in sld, which can be used to properly trim
the property strings you use to label your features.
<ogc:Function name="strTrim">
<ogc:PropertyName>NAME</ogc:PropertyName>
</ogc:Function>
For more elaborate documentation on the use of pre-defined functions and on how to implement your own custom functions, see SLD custom and predefined functions - how to use them.
OptionaliconThe custom icon provider. This provider allows to provide custom icons for the Symbology Encoding file's
ExternalGraphics elements.
OptionalpainterThis parameter indicates which styles will be used for rendering:
map: normal + mapOnlylegend: normal + legendOnlyThis parameter is tightly bound to the vendor option "inclusion", which can be used in an SLD style file to differentiate between styles for painting on a regular map (mapOnly) and styles for painting for a legend (legendOnly). Any SLD style (or style-part) can thus have 3 possible "inclusion" types:
map painter.legend painter.map and legend painters.Note that it is possible to create a Painter with type "legend" and still use it to paint your features on a regular map. It is up to the calling code to generate the right kind of painter for the purpose it needs to serve.
For more elaborate documentation on the use of a legend painter and on how to alter your sld style files to generate nice legend entries, see SLD legend through vendor option 'inclusion' - Usage and examples.
OptionalpinThis parameter allows to define one PinStyle for all point-based labels in the Symbology Encoding file.
OptionalstrictConfigures whether the factory method should fail if invalid elements are encountered. The default value is false.
Configuration object for the Symbology Encoding factory functions.