map.apps Bundle APIs 4.20.0
    Preparing search index...

    Interface LayerConfigParser

    Parses layer configurations.

    Use service name "map-config-api.LayerConfigParser" to inject an instance of this class.

    interface LayerConfigParser {
        parse(configs: LayerProperties[]): Promise<Layer[]>;
    }
    Index

    Methods

    Methods

    • Parses array of layer configurations.

      Parameters

      Returns Promise<Layer[]>

      A promise which resolves to an array of layer instances.

      configParser.parse([{
      "visible": true,
      "url": "http://water.discomap.eea.europa.eu/arcgis/rest/services/BathingWater/BathingWater_Dyna_WM/MapServer",
      "type": "AGS_DYNAMIC",
      "sublayers": ["*"]
      }]).then((layers) => {
      // layers[0] is instance of @arcgis/core/layers/MapImageLayer
      });