Use the map-widget.MapWidgetFactory service to inject an instance of this interface.

The MapWidgetFactory provides some methods to create the parts of a MapWidget.

interface MapWidgetFactory {
    createMap(options: MapProperties): Map;
    createWidget(options: unknown): MapWidget;
    createWidgetModel(
        options: Partial<MapWidgetModelMembers> & { map: Map },
    ): MapWidgetModel;
}

Methods

  • Creates a esri/Map instance.

    Parameters

    • options: MapProperties

      options of the esri/Map constructor.

    Returns Map

    the new map instance.

    Map

  • Creates a MapWidget instance.

    Parameters

    • options: unknown

      options of the MapWidget constructor.

    Returns MapWidget

    the MapWidget instance.

  • Creates a MapWidgetModel instance.

    Note: in options the map parameter is required and needs to be a esri/Map instance.

    Parameters

    Returns MapWidgetModel

    the MapWidgetModel instance.