Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Line

Hierarchy

Implements

Index

Constructors

constructor

  • Create a layer group, optionally given an initial set of layers.

    Parameters

    Returns Line

Methods

addEventListener

  • addEventListener(type: string, fn: function, context?: any): Line
  • addEventListener(eventMap: any, context?: any): Line
  • Parameters

    Returns Line

  • Parameters

    • eventMap: any
    • Optional context: any

    Returns Line

addLayer

addOneTimeEventListener

  • addOneTimeEventListener(type: string, fn: function, context?: any): Line
  • Parameters

    Returns Line

addTo

clearAllEventListeners

  • clearAllEventListeners(): Line

clearLayers

eachLayer

  • Iterates over the layers of the group, optionally specifying context of the iterator function.

    Parameters

    • fn: function
        • Parameters

          Returns void

    • Optional context: any

    Returns LayerGroup<ILayer>

fire

  • fire(type: string, data?: any): Line
  • Parameters

    • type: string
    • Optional data: any

    Returns Line

fireEvent

  • fireEvent(type: string, data?: any): Line
  • Parameters

    • type: string
    • Optional data: any

    Returns Line

getBounds

  • Returns LatLngBounds

getLayer

  • getLayer(id: string): ILayer
  • Returns the layer with the given id.

    Parameters

    • id: string

    Returns ILayer

getLayerId

  • getLayerId(layer: ILayer): string

getLayers

  • Returns an array of all the layers added to the group.

    Returns ILayer[]

hasEventListeners

  • hasEventListeners(type: string): boolean
  • Parameters

    • type: string

    Returns boolean

hasLayer

  • hasLayer(layer: ILayer): boolean
  • Returns true if the given layer is currently added to the group.

    Parameters

    Returns boolean

off

  • off(type: string, fn?: function, context?: any): Line
  • off(eventMap?: any, context?: any): Line
  • Parameters

    • type: string
    • Optional fn: function
    • Optional context: any

    Returns Line

  • Parameters

    • Optional eventMap: any
    • Optional context: any

    Returns Line

on

  • on(type: string, fn: function, context?: any): Line
  • on(eventMap: any, context?: any): Line
  • Parameters

    Returns Line

  • Parameters

    • eventMap: any
    • Optional context: any

    Returns Line

onAdd

  • onAdd(map: Map): void
  • Should contain code that creates DOM elements for the overlay, adds them to map panes where they should belong and puts listeners on relevant map events. Called on map.addLayer(layer).

    Parameters

    Returns void

onRemove

  • onRemove(map: Map): void
  • Should contain all clean up code that removes the overlay's elements from the DOM and removes listeners previously added in onAdd. Called on map.removeLayer(layer).

    Parameters

    Returns void

once

  • once(type: string, fn: function, context?: any): Line
  • Parameters

    Returns Line

removeEventListener

  • removeEventListener(type: string, fn?: function, context?: any): Line
  • removeEventListener(eventMap?: any, context?: any): Line
  • Parameters

    • type: string
    • Optional fn: function
    • Optional context: any

    Returns Line

  • Parameters

    • Optional eventMap: any
    • Optional context: any

    Returns Line

removeLayer

toGeoJSON

  • toGeoJSON(): any
  • Returns a GeoJSON representation of the layer group (GeoJSON FeatureCollection).

    Returns any

Static addInitHook

  • addInitHook(methodName: string, ...args: any[]): void
  • You can also use the following shortcut when you just need to make one additional method call.

    Parameters

    • methodName: string
    • Rest ...args: any[]

    Returns void

Static extend

  • You use L.Class.extend to define new classes, but you can use the same method on any class to inherit from it.

    Parameters

    Returns any