Options
All
  • Public
  • Public/Protected
  • All
Menu

Manages custom layers for a map

export
interface

ILayerManager

Hierarchy

  • ILayerManager

Implemented by

Index

Methods

  • addLayer<T>(name: string, layer: T, allowReplace?: boolean): ILayerInfo
  • Adds a layer to the map

    memberof

    ILayerManager

    Type parameters

    • T: BaseLayer<T>

    Parameters

    • name: string

      The name of the layer

    • layer: T

      The layer object

    • Optional allowReplace: boolean

    Returns ILayerInfo

    The added layer

  • Adds the given parsed features as a new external layer

    memberof

    ILayerManager

    since

    0.13

    since

    0.14 Styles for geometry types not found in the parsed features will be deleted

    Parameters

    Returns Promise<ILayerInfo>

  • getLayer<T>(name: string): undefined | T
  • Gets a layer by the given name

    memberof

    IMapViewer

    Type parameters

    • T: BaseLayer<T>

    Parameters

    • name: string

    Returns undefined | T

  • Gets all custom layers on this map, sorted by draw order (First item is top-most layer. Last item is bottom-most layer.)

    memberof

    ILayerManager

    Returns ILayerInfo[]

  • hasLayer(name: string): boolean
  • Gets whether the specified custom layer exists on the map

    Parameters

    • name: string

    Returns boolean

  • Attempts to parse features for the given input file. A failed attempt is when calling hasFeatures() on the returned parsed features returns false.

    memberof

    ILayerManager

    since

    0.13

    Parameters

    Returns Promise<IParsedFeatures>

  • removeLayer(name: string): undefined | BaseLayer
  • Removes a layer by the given name

    memberof

    IMapViewer

    Parameters

    • name: string

    Returns undefined | BaseLayer

  • tryGetSubjectLayer(): undefined | BaseLayer
  • Get the active subject layer if present on the current map. In a MapGuide-specific context, subject layers do not exist and this method will always return undefined in such cases

    memberof

    ILayerManager

    since

    0.14

    Returns undefined | BaseLayer

Generated using TypeDoc