Options
All
  • Public
  • Public/Protected
  • All
Menu

地图工具链

Hierarchy

  • default<{ change: { currentKey: string; executeKey: string; isOnceTool: boolean; previousKey: string } }>
    • MapTools

Index

Constructors

constructor

Properties

Private _activedKey

_activedKey: string = 'default'

当前激活工具的Key

Private _toolPool

_toolPool: Map<string, BaseTool<unknown>> = ...

工具池

Protected map_

map_: IMap

地图对象

Protected view_

view_: IView

视图对象

Accessors

activedKey

  • get activedKey(): string

pluginName

  • get pluginName(): string

Methods

Private _init

  • _init(): void

createCustomTool

deleteTool

fire

  • fire<K>(name: K, data?: { change: { currentKey: string; executeKey: string; isOnceTool: boolean; previousKey: string } }[K]): void
  • 触发监听函数

    Type parameters

    • K: "change"

    Parameters

    • name: K

      监听函数名

    • Optional data: { change: { currentKey: string; executeKey: string; isOnceTool: boolean; previousKey: string } }[K]

      数据

    Returns void

getTool

  • getTool<T>(key: string): T

hasTool

  • hasTool(key: string): boolean

installPlugin

off

  • off<K>(name: K, callback?: IObserverCallback<{ change: { currentKey: string; executeKey: string; isOnceTool: boolean; previousKey: string } }[K], K, MapTools, void>): void
  • 移除监听函数

    Type parameters

    • K: "change"

    Parameters

    • name: K

      监听类型名

    • Optional callback: IObserverCallback<{ change: { currentKey: string; executeKey: string; isOnceTool: boolean; previousKey: string } }[K], K, MapTools, void>

      监听回调函数(不指定者移除所有)

    Returns void

on

  • on<K>(name: K, callback: IObserverCallback<{ change: { currentKey: string; executeKey: string; isOnceTool: boolean; previousKey: string } }[K], K, MapTools, void>): IObserverHandler
  • 绑定监听函数

    Type parameters

    • K: "change"

    Parameters

    • name: K

      监听类型名

    • callback: IObserverCallback<{ change: { currentKey: string; executeKey: string; isOnceTool: boolean; previousKey: string } }[K], K, MapTools, void>

      监听回调函数

    Returns IObserverHandler

setMapTool

Generated using TypeDoc