Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GoogleLayer<T, S>

Layer is a container class that is responsible for creating and managing a Google Maps source and associated layer representation on a Google Maps map.

Type parameters

Hierarchy

Index

Constructors

constructor

  • new GoogleLayer(layer: string, opts: T, id?: string): GoogleLayer
  • Parameters

    • layer: string
    • opts: T
    • Default value id: string = undefined

    Returns GoogleLayer

Properties

data

data: Record<string, any>

enabled

enabled: boolean

id

id: string

source

source: any

Accessors

isHidden

  • get isHidden(): boolean
  • Returns whether the layer is currently hidden.

    readonly
    memberof

    MapLayer

    Returns boolean

layerId

  • get layerId(): string
  • Layer identifier on the map.

    readonly
    memberof

    MapLayer

    Returns string

map

  • get map(): Map
  • Map currently associated with the layer.

    readonly
    memberof

    MapLayer

    Returns Map

opacity

  • get opacity(): number
  • Returns the current layer opacity.

    readonly
    memberof

    MapLayer

    Returns number

opts

  • get opts(): T
  • Returns T

renderable

  • get renderable(): S
  • Native map object(s) that gets rendered to the map.

    readonly
    memberof

    MapLayer

    Returns S

Methods

addTo

  • addTo(map: Map, index?: number): void
  • Adds the layer to the specified map.

    memberof

    MapLayer

    Parameters

    • map: Map
    • Optional index: number

    Returns void

exists

  • exists(): boolean
  • Returns whether the layer currently exists on the map.

    memberof

    MapLayer

    Returns boolean

has

  • has(type: string): boolean
  • Returns whether the listeners are registered for the specified event name.

    memberof

    EventDispatcher

    Parameters

    • type: string

    Returns boolean

hide

  • hide(): void
  • Hides the layer on the map.

    memberof

    MapLayer

    Returns void

invalidate

  • invalidate(): void
  • Returns void

off

  • Removes a registered listener function for the specified event.

    memberof

    EventDispatcher

    Parameters

    • type: string

      Name of the event to remove the listener for.

    • callback: Function

      Handler function to remove so it won't be executed next time the event is triggered.

    • Default value scope: any = null

    Returns EventDispatcher

offAll

on

  • on(type: string, callback: Function, scope?: any, priority?: number): EventDispatcher
  • Registers a listener function to be executed each time an event occurs

    memberof

    EventDispatcher

    Parameters

    • type: string

      Name of the event to listen for. Value can contain multiple event names separated by spaces to trigger the same handler function for each event name.

    • callback: Function

      Handler function to be called when the event occurs

    • Default value scope: any = null
    • Default value priority: number = 0

    Returns EventDispatcher

once

  • once(type: string, callback: Function, scope?: any, priority?: number): EventDispatcher
  • Registers a listener function to be executed the first time an event occurs.

    memberof

    EventDispatcher

    Parameters

    • type: string

      Name of the event to listen for. Value can contain multiple event names separated by spaces to trigger the same handler function for each event name.

    • callback: Function

      Handler function to be called when the event occurs

    • Default value scope: any = null
    • Default value priority: number = 0

    Returns EventDispatcher

remove

  • remove(): void
  • Removes the layer from the map it is currently active on.

    memberof

    MapLayer

    Returns void

setOpacity

  • setOpacity(value: number): void
  • Changes the opacity of the layer.

    memberof

    MapLayer

    Parameters

    • value: number

    Returns void

setZIndex

  • setZIndex(index: number): void
  • Parameters

    • index: number

    Returns void

show

  • show(): void
  • Shows the layer on the map.

    memberof

    MapLayer

    Returns void

trigger

  • Triggers the specified event so that all registered listeners will be executed with the specified parameters.

    memberof

    EventDispatcher

    Parameters

    • type: any

      Event name to trigger

    • Default value data: any = null

    Returns EventDispatcher

Generated using TypeDoc