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

    Interface ConfigInterpreter

    Interprets the map configuration.

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

    interface ConfigInterpreter {
        interpret(config: Record<string, any>): InterpreterResult;
    }
    Index

    Methods

    Methods

    • Interprets a json config.

      Parameters

      • config: Record<string, any>

        the json config input.

      Returns InterpreterResult

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