• Public
  • Public/Protected
  • All

Module ria/ogc/se/SEPainterFactory

This module provides factory methods to create a LuciadRIA feature painter based on an Symbology Encoding file.

Supported versions and limitations

  • Supports the styling of feature data with the OpenGIS Symbology Encoding specification version 1.1.0 (OGC 05-077r4)
  • Does not supportCoverageStyle encodings.
  • Supported features:
    • FeatureTypeStyle: describes the styling for a feature type. It is possible to create a FeatureTypeStyle with multiple Rules.
    • Rules: Styling Rules contain one or more symbolizers, OGC filters and scale range limitations.
    • Symbolizers: Styling options. Styling options that are not available in a LuciadRIA FeaturePainter are ignored. You can define OGC Filter Expressions in a symbolizer where the specification allows this.
      More information about the supported features for the different symbolizers can be found below.
  • PointSymbolizer
    • You can define ExternalGraphic instances with OnlineResource and InlineContent elements. This corresponds to the way you can paint icons with the drawIcon() method of the FeaturePainter.
    • Mark is supported with WellKnownName elements that contain well-known shape names. The allowed values include square, circle, triangle, star, cross, x, pentagon and hexagon.
      If you use an unrecognized name, the value is defaulted to square.
    • All web formats that can be rendered on an HTML5 canvas are supported, including SVG graphics. For InlineContent elements, both base64 and XML encodings are supported for SVG graphics, while for other formats only base64 encoding is supported.
      It is possible to configure the Size, Displacement, Rotation, AnchorPoint and Opacity of the Graphic. Other point symbolizer styling options are ignored.
  • LineSymbolizer
    • It is possible to define the following SVGParameters for a line symbolizer Stroke: GraphicStroke, stroke, stroke-width, stroke-opacity, stroke-dasharray, stroke-dashoffset.
      Other parameters that affect the line symbolizer are ignored.
  • PolygonSymbolizer
    • To define the stroke of a polygon, you can use the SVGParameters GraphicStroke, stroke, stroke-width, stroke-opacity, stroke-dasharray, stroke-dashoffset.
    • To fill a polygon, you can use the fill and fill-opacity SVGParameters to configure the interior color and opacity of the shape. Use a GraphicFill to specify a fill pattern. You can adjust the Size, Rotation and Opacity of the pattern. You can also use Mark as a fill pattern.
  • Labeling
    • Use label to specify the text contents of the label. All Font parameters - family, style, size, and weight - are supported. All Fill and Halo properties are supported, except graphicFill patterns.
    • For labelPlacement, use either a PointPlacement to label features relative to the focus point of its Shape, or a LinePlacement to indicate that labels should follow the outline of the Shape.
    • The actual positioning of the labels on the map is automated by LuciadRIA. Its positioning rules diverge from the available options in the Symbology Encoding specification:
      • PointPlacement:
        • The rotation and anchorPoint properties are not supported.
        • The X and Y Displacement values are averaged to a single label offset.
      • LinePlacement:
        • If the isAligned property is set to its default value true, the labels are aligned to the line geometry. If its value is false, labels are drawn horizontally.
        • If the isRepeated property is set to true, the label is repeated along the path, taking into account the values for the gap and initialGap properties.
      • The generalizeLine property is not supported.
  • Unit of measure support
    • The Symbology Encoding painter respects the uom unit-of-measure attribute in the Line and Polygon Symbolizers in order to configure how styling parameters must be interpreted for drawing lines. It allows you to define the line width and dash pattern in meters or feet instead of pixels.
    • In the Point symbolizer, the uom attribute is not picked up, so the size of icons is expressed in pixels only.
    • The attribute is also not picked up in the Text Symbolizer. It is therefore not possible to draw text expressed in meters or feet.
    • In addition, in the Polygon symbolizer, the uom attribute is applied to the Stroke element only. For other elements in the Polygon symbolizer, all units are measured in pixels.




  • Generates a LuciadRIA painter from a Symbology Encoding in a JavaScript String. This method can be used if the Symbology Encoding definition is already downloaded from the server, for example by means of an Ajax call.

    Currently the Factory only supports FeatureTypeStyle symbology encodings. CoverageStyle encodings are not supported.

    For more information on supported features, please refer to the developer guide.


    InvalidXMLError if an error in the Symbology Encoding definition was encountered.


    • seString: string

      The symbology encoding XML definition in a JavaScript String.

    • Optional options: SEPainterCreateOptions

      an object containing configuration parameters for the factory

    Returns Promise<FeaturePainter>

    A promise for a LuciadRIA feature painter that realizes the given Symbology Encoding file.


  • Generates a LuciadRIA painter from a Symbology Encoding in a file located on a web server. The symbology encoding file is retrieved by means of passing its URL to the factory method.

      //Use the factory method from the SEPainterFactory module to create the painter
      //As input we use the url of the SLD file
      const seURL = "http://foo.com/se/CitiesSymbolizer.xml";
          .then(function(sePainter) {
                //Create a new layer which uses the created painter
                const layer = new FeatureLayer(citiesModel, {
                  label: "Cities Layer",
                  painter: sePainter
                //Add the layer to the map
              function(error) {
                console.log("could not create a painter from symbology encoding at " + seURL);

    InvalidXMLError if an error in the Symbology Encoding was encountered.


    Error if the value configuration parameter in the Symbology Encoding is invalid.


    • url: string

      The location of the symbology encoding XML file.

    • Optional options: SEPainterCreateOptions

      an object literal containing painter creation configuration parameters the factory method.

    Returns Promise<FeaturePainter>

    A promise for a LuciadRIA feature painter that realizes the given Symbology Encoding file.


  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method