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

    Interface MapWidgetModelMembers

    Documentation for the members of MapWidgetModel.

    interface MapWidgetModelMembers {
        get camera(): undefined | Camera;
        get center(): undefined | Point;
        get clippingArea(): undefined | Extent;
        get constraints(): Constraints;
        destroy(): void;
        get environment(): undefined | SceneViewEnvironment;
        get extent(): undefined | Extent;
        findLayerInMap(layerIdPath: undefined | string): LayerLookupResult;
        getLayerVisibility(
            layerIdPathOrLayer: string | AnyLayer,
        ): Promise<undefined | LayerVisibility>;
        getLiveLayerVisibility(
            layerIdPathOrLayer: string | AnyLayer,
        ): undefined | LayerVisibility;
        height: undefined | number;
        initialExtent: undefined | Extent;
        initialViewMode: undefined | ViewMode;
        initialViewParameters: undefined | Record<string, any>;
        isEffectivelyVisible(
            layerIdPathOrLayer: string | AnyLayer,
        ): Promise<boolean>;
        get map(): Map;
        get navigation(): Navigation;
        get padding(): undefined | Readonly<ViewPadding>;
        ready: undefined | boolean;
        rotation: undefined | number;
        scale: undefined | number;
        get spatialReference(): undefined | SpatialReference;
        get timeExtent(): undefined | TimeExtent;
        updating: undefined | boolean;
        view: undefined | View;
        get viewingMode(): undefined | ViewingMode;
        viewmode: ViewMode;
        get viewpoint(): undefined | Viewpoint;
        width: undefined | number;
        zoom: undefined | number;
    }
    Index

    Properties

    height: undefined | number

    The current height of the view. Readonly.

    It's provided for convenience, so that it is not required to watch for "view" changes.

    View

    initialExtent: undefined | Extent

    Provides access to the first initial extent after initialization. This property is initialized when the first view is set on the MapWidgetModel.

    It is intended to support "zoom to initial extent" requirements.

    initialViewMode: undefined | ViewMode

    Provides access to the first initial viewmode (2D or 3D) after initialization. This property is initialized when the first view is set on the MapWidgetModel.

    It is intended to support "restore initial view" requirements.

    initialViewParameters: undefined | Record<string, any>

    Provides access to the first initial view parameter (e.g. extent, zoom etc.) after initialization. This property is initialized when the first view is set on the MapWidgetModel.

    It is intended to support "restore initial view" requirements.

    ready: undefined | boolean

    true: current state is matching view state. Check for view.ready and view.viewpoint === model.viewpoint; and model.viewmode == view.type

    rotation: undefined | number

    The map's rotation state. Only available if viewmode is 2D.

    It's provided for convenience, so that it is not required to watch for "view" changes.

    scale: undefined | number

    The map's scale.

    It's provided for convenience, so that it is not required to watch for "view" changes.

    updating: undefined | boolean

    If true then data requests are currently pending.

    It's provided for convenience, so that it is not required to watch for "view" changes.

    view: undefined | View

    Provides access to the current view implementation.

    This value is set by the MapWidget if the viewmode changes. This value is undefined until the view is initialized by the MapWidget.

    viewmode: ViewMode

    The current view mode. Possible values are "2D", "3D". If this state is changed, then the value of the "view" property changes.

    width: undefined | number

    The current width of the view. Readonly.

    It's provided for convenience, so that it is not required to watch for "view" changes.

    View

    zoom: undefined | number

    The current zoom level.

    It's provided for convenience, so that it is not required to watch for "view" changes.

    Accessors

    • get camera(): undefined | Camera

      The scene camera. Only available if viewmode is 3D.

      It's provided for convenience, so that it is not required to watch for "view" changes.

      Returns undefined | Camera

    • get center(): undefined | Point

      The map's center point.

      It's provided for convenience, so that it is not required to watch for "view" changes.

      Returns undefined | Point

    • get clippingArea(): undefined | Extent

      The view's current clipping area. Only available if viewmode is 3D and if the viewingMode is local.

      Returns undefined | Extent

    • get constraints(): Constraints

      Provides access to the current constraints (2D or 3D).

      Any property changed will result in an update of the corresponding MapView or SceneView but not the other way around. Changes of the constraints of the view will not be synchronized to this constraints property.

      Returns Constraints

    • get environment(): undefined | SceneViewEnvironment

      Properties of the environment's visualization in the view. Only available if viewmode is 3D.

      Returns undefined | SceneViewEnvironment

    • get extent(): undefined | Extent

      The map's extent.

      It's provided for convenience, so that it is not required to watch for "view" changes.

      Returns undefined | Extent

    • get map(): Map

      The map, it contains the layer structure.

      Returns Map

      Map

    • Provides access to the current navigation settings.

      All property changes on this object will be applied to the current view and will be reapplied whenever the current view changes. Property changes done directly on the view will not be synchronized back to this object.

      Returns Navigation

    • get padding(): undefined | Readonly<ViewPadding>

      The map's padding. Has to be updated as whole object, single values (left, right, ...) won't trigger View update.

      Returns undefined | Readonly<ViewPadding>

    • get spatialReference(): undefined | SpatialReference

      The spatial reference system of the map.

      Returns undefined | SpatialReference

    • get timeExtent(): undefined | TimeExtent

      The map's time extent.

      It's provided for convenience, so that it is not required to watch for "view" changes.

      Returns undefined | TimeExtent

    • get viewingMode(): undefined | ViewingMode

      Returns the current viewing mode of the view. Only available if viewmode is 3D.

      Returns undefined | ViewingMode

    • get viewpoint(): undefined | Viewpoint

      The map's viewpoint.

      It's provided for convenience, so that it is not required to watch for "view" changes.

      Returns undefined | Viewpoint

    Methods

    • The map widget model must be destroyed when it is no longer needed.

      NOTE: The lifetime of the default map widget model is managed by map.apps itself.

      Returns void

    • Finds a layer by id in the map. The layerIdPath is e.g. <layerId> or <layerId>/<sublayerId>.

      Parameters

      • layerIdPath: undefined | string

        The layer id path.

      Returns LayerLookupResult

    • Returns effective visibility information for the given layer.

      This works by evaluating the current state of the layer and the current state of the view (scale, extent, etc.).

      The layer can be specified as an id or path (e.g. layerId or layerId/sublayerId) or as a direct layer reference.

      Parameters

      Returns Promise<undefined | LayerVisibility>

    • Returns the current visibility issues for the given layer.

      This works by evaluating the current state of the layer and the current state of the view (scale, extent, etc.).

      The layer can be specified as an id or path (e.g. layerId or layerId/sublayerId) or as a direct layer reference.

      NOTE: This function should be called within a reactive watch (or effect, etc.). Otherwise, it may produce outdated results.

      Parameters

      Returns undefined | LayerVisibility

    • Returns true if the layer is effectively visible, false otherwise.

      This works by evaluating the current state of the layer and the current state of the view (scale, extent, etc.).

      The layer can be specified as an id or path (e.g. layerId or layerId/sublayerId) or as a direct layer reference.

      NOTE: This function is a convenience function around getLayerVisibility. It returns true if (and only if) there are no visibility issues.

      Parameters

      Returns Promise<boolean>