Options
All
  • Public
  • Public/Protected
  • All
Menu

Module ria/ogc/se/SEPainterFactory

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

For documentation of supported features and limitations, see SLD styling - supported versions and limitations.

Overview

Functions

createPainterFromString

  • 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.

    throws

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

    Parameters

    • 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.

createPainterFromURL

  • 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";
      createPainterFromURL(seURL)
          .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
                map.layerTree.addChild(layer);
              },
              function(error) {
                console.log("could not create a painter from symbology encoding at " + seURL);
              }
          );
    
    throws

    InvalidXMLError if an error in the Symbology Encoding was encountered.

    throws

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

    Parameters

    • 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.

Legend

  • 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