Interface ConfigInterpreter

Interprets the map configuration.

Use "map-init.Interpreter" to inject a reference to this interface.

interface ConfigInterpreter {
    interpret(config): InterpreterResult;
}

Methods

Methods

  • Interprets a json config.

    Parameters

    • config: Record<string, any>

      the json config input.

    Returns InterpreterResult

    Example

    let interpreter = ...;
    let result = interpreter.interpret({map: {basemap: "streets"}});
    // create widget and model classes
    let {mapWidget, mapWidgetModel, map, basemapsModel} = await result.toMapWidget();
    // alternative is to only create the model classes
    let {mapWidgetModel, map, basemapsModel} = await result.toMapWidgetModel();

Generated using TypeDoc