• 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);
    }
    );

    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.

    Throws

    InvalidXMLError if an error in the Symbology Encoding was encountered.

    Throws

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