Extends the capabilities of an Esri Map object.

Hierarchy (view full)

Constructors

Properties

_deserializedMapPromise: Promise<void>

The Promise created when the 'map' property is deserialized.

_deserializedViewMode: ViewMode

The viewMode value deserialized from a saved project.

_deserializedViewModePromise: Promise<void>

The Promise created to switch viewModes when a saved project is loaded.

_handles: Handles<unknown, ResourceHandle>
_id: string

The unique ID for this entity. Once set, this should never change.

_isSwitchingMap: boolean = false

Indicates that the extension is in the process of switching maps.

_itemType: string = ItemType.MAP_EXTENSION

The item type for this entity when it participates in an App.

_map: Map

The underlying WebMap instance created from mapping/MapExtension!MapExtension.webMap.

_scene: WebScene

The underlying WebScene instance created from mapping/MapExtension!MapExtension.webScene.

@eventTypes: MapExtensionEvents

Do not directly reference this property. Use EventNames and EventTypes helpers from @arcgis/core/Evented.

A flat collection of all the layers extensions in the map. This collection contains extensions for basemap layers, operational layers and ground layers. Extensions for group layers and their children are also part of this collection. This collection is read-only.

constraints: MapConstraints

Configured constraints for the map. Note that it is the caller's responsibility to set these constraints on any MapView or SceneView instances that are created.

formatSettings: FormatSettings

Settings that affect how values in this mapping/MapExtension!MapExtension are formatted.

onClick?: Action

An action that will be performed when the user clicks on the map.

onHover?: Action

An action that will be performed when the user hovers over the map.

onHoverEnd?: Action

An action that will be performed when the user stops hovering over the map.

onInitialized?: Action

An action that will be performed when the map initializes.

onViewpointChanged?: Action

An action that will be performed when the viewpoint changes.

tableExtensions: TableExtensionCollection

The table extensions associated with each table in the map.

Accessors

  • get _spatialReference(): SpatialReference
  • Gets the spatial reference of the map.

    Returns SpatialReference

  • get bookmarks(): Collection<Bookmark>
  • Bookmarked locations on this map.

    Returns Collection<Bookmark>

  • get id(): string
  • The unique ID for this entity.

    Returns string

  • get initialViewMode(): ViewMode
  • The initial view mode for the map (2D or 3D).

    Returns ViewMode

  • set initialViewMode(viewMode): void
  • Parameters

    Returns void

  • get isSwitchingMap(): boolean
  • Indicates that the extension is in the process of switching maps.

    Returns boolean

  • get itemType(): string
  • The item type for this entity when it participates in an App.

    Returns string

  • get map(): Map
  • The Esri Map object being extended.

    Returns Map

  • get title(): string
  • A human-readable title for the map.

    Returns string

  • set title(value): void
  • Parameters

    • value: string

    Returns void

  • get viewMode(): ViewMode
  • The current view mode for the map (2D or 3D).

    Returns ViewMode

  • get webMapItemTitle(): string
  • The title of the web map portal item.

    Returns string

  • get webSceneItemTitle(): string
  • The title of the web scene portal item.

    Returns string

Methods

  • Invoked when web map/web scene json needs to be applied to the Map object.

    Parameters

    • mapProperties: MapProperties

      The properties to apply.

    • map: Map

      The map/scene to apply the properties to.

    • OptionalportalItem: PortalItem

      Portal item that the properties came from, if applicable.

    Returns Promise<void>

  • Creates the 2D map from the webMap if it's not already created.

    Returns Promise<void>

  • Creates the 3D scene from the webScene if it's not already created.

    Returns Promise<void>

  • Called to perform cleanup. Subclasses should override this method rather than destroy() to perform custom cleanup.

    Returns Promise<void>

  • Called after normal initialization. Note: Child items are initialized before this is called.

    Returns Promise<void>

  • A clean-up function that should get called whenever the item is disposed of.

    Returns Promise<void>

  • Gets a flattened list of all feature sources for the associated map.

    Parameters

    • predicate: FeatureSourcePredicate = ...

      If specified, only sources that match the given predicate will be returned.

    Returns FeatureSource[]

  • Initializes the item.

    Returns Promise<void>

  • Determines whether this map extension supports the given view mode.

    Parameters

    • viewMode: ViewMode

      The view mode to check.

    Returns boolean

  • Updates the map that will load when the view mode is switched to MAP.

    Parameters

    Returns Promise<void>

  • Updates the map that will load when the view mode is switched to SCENE.

    Parameters

    Returns Promise<void>

  • Switches the current map for a new one. This operation will reconfigure existing layer, sublayer, and table extensions to extend the equivalent ones in the new map, if possible.

    The primary use case is for switching between maps that have a similar configuration, for example when going between a map and a scene with similar layers.

    Parameters

    • newMap: Map

      The new map.

    Returns Promise<void>

  • Switches the map extension's view mode.

    Parameters

    • viewMode: ViewMode

      The view mode to switch to.

    Returns Promise<void>

  • Creates an item:// URI reference to this entity.

    Returns string