Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Control
    • LLocationControl

Index

Constructors

constructor

  • new LLocationControl(locateCallback: () => void, options?: ControlOptions): LLocationControl
  • Creates a new control that moves the map to the user's location.

    Parameters

    • locateCallback: () => void

      Callback function for when the user wants to be located on the map

        • (): void
        • Returns void

    • Optional options: ControlOptions

      Any extra Leaflet layer options

    Returns LLocationControl

Properties

Private Readonly locateButton

locateButton: HTMLElement

options

options: ControlOptions

Methods

addTo

  • Parameters

    • map: Map

    Returns LLocationControl

getContainer

  • getContainer(): undefined | HTMLElement
  • Returns undefined | HTMLElement

getPosition

  • getPosition(): ControlPosition
  • Returns ControlPosition

onAdd

  • onAdd(_map: Map): HTMLElement
  • Parameters

    • _map: Map

    Returns HTMLElement

onLocationAvailable

  • onLocationAvailable(): void
  • Returns void

onLocationNotAvailable

  • onLocationNotAvailable(): void
  • Returns void

Optional onRemove

  • onRemove(map: Map): void
  • Parameters

    • map: Map

    Returns void

remove

  • Returns LLocationControl

setPosition

  • Parameters

    • position: ControlPosition

    Returns LLocationControl

Static addInitHook

  • addInitHook(initHookFn: () => void): any
  • addInitHook(methodName: string, ...args: any[]): any
  • Parameters

    • initHookFn: () => void
        • (): void
        • Returns void

    Returns any

  • Parameters

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

    Returns any

Static Private createLocateButton

  • createLocateButton(): HTMLElement
  • Returns HTMLElement

Static extend

  • extend<T>(props: T): new (...args: any[]) => T & typeof Control
  • Type parameters

    • T: object

    Parameters

    • props: T

    Returns new (...args: any[]) => T & typeof Control

Static include

  • include(props: any): any
  • Parameters

    • props: any

    Returns any

Static mergeOptions

  • mergeOptions(props: any): any
  • Parameters

    • props: any

    Returns any

Generated using TypeDoc