Options
All
  • Public
  • Public/Protected
  • All
Menu

ExtentManager arbitrates potentially conflicting {@link esri.Map} navigation events. For example, a Workflow run on application start up may attempt to zoom the map to a particular location while a custom module attempts to navigate to another.

In order to classify and prioritize competing map navigation requests, the ExtentManager offers an arbitrary system of navigation priorities. These are known as 'extent changes' and each carries a priority value based on the nature of the change (i.e. how 'important' it is).

docs-hide-from-nav

Hierarchy

  • ExtentManager

Index

Constructors

constructor

  • new ExtentManager(map: Map, essMap: Map, fitToExtent?: boolean): ExtentManager
  • Initializes a new instance of the ExtentManager class.

    Parameters

    • map: Map

      The map that this ExtentManager arbitrates.

    • essMap: Map
    • Optional fitToExtent: boolean

      Whether or not to force tiled maps to show up completely in the given map extent

    Returns ExtentManager

Methods

blockForReposition

  • blockForReposition(): void
  • Repositions the map within the div if there are no other extent changes in progress. If there are other extent changes in progress, the reposition will wait for the current extent change to finish and prevent all other extent changes until the reposition is finished.

    Returns void

blockForResize

  • blockForResize(width: number, height: number, immediate?: boolean): void
  • Resizes the map if there are no other extent changes in progress, as the resize operation may interface with the extent change. If there are other extent changes in progress, the resize will wait for the current extent change to finish and prevent all other extent changes until the resize is finished.

    Parameters

    • width: number

      The desired height of the map control.

    • height: number
    • Optional immediate: boolean

      Whether or not to resize immediately.

    Returns void

centerAtWithPriority

  • centerAtWithPriority(center: Point, priority?: number): void
  • Centers the map to the given point if there are no other higher priority extent changes in progress. If there are other extent changes in progress, the priority of this extent change must be greater than or equal to the priority of the current extent change for it to take effect.

    Parameters

    • center: Point

      The point to center at.

    • Optional priority: number

      The priority to be applied to this operation

    Returns void

changeExtentWithPriority

  • changeExtentWithPriority(extentChangeFunction: function, priority?: number): void
  • Invokes the given function if there are no other extent changes in progress. If there are other extent changes in progress, the priority of this extent change must be greater than or equal to the priority of the current extent change for it to take effect.

    This methods allows for extent changes to be scheduled, but to not interfere with more "important" ones.

    Parameters

    • extentChangeFunction: function

      The function to be executed if there are no higher priorities. This function most likely attempts to change the map extent.

        • (map: Map): Promise<void>
        • Parameters

          • map: Map

          Returns Promise<void>

    • Optional priority: number

      The priority to be applied to this operation

    Returns void

firstResize

  • firstResize(): void
  • Signals that the map has loaded, the initial extent is set after resizing the map appropriately and the extent manager is now allowed to arbitrate future extent changes.

    Returns void

registerLayer

  • registerLayer(layer: Layer): void
  • Registers the given layer with the extent manager so that it can wait until the layer has sucessfully loaded to change the extent.

    Parameters

    • layer: Layer

      The layer to register.

    Returns void

setExtentWithPriority

  • setExtentWithPriority(extent: Extent, priority?: number): void
  • Changes the map to the given extent if there are no other higher priority extent changes in progress. If there are other extent changes in progress, the priority of this extent change must be greater than or equal to the priority of the current extent change for it to take effect.

    Parameters

    • extent: Extent

      The extent to change to.

    • Optional priority: number

      The priority to be applied to this operation

    Returns void

setScaleWithPriority

  • setScaleWithPriority(scale: number, priority?: number): void
  • Zooms the map to the given scale if there are no other extent changes in progress. If there are other extent changes in progress, the priority of this extent change must be greater than or equal to the priority of the current extent change for it to take effect.

    Parameters

    • scale: number

      The scale to zoom to.

    • Optional priority: number

      The priority to be applied to this operation

    Returns void