Class InfoControl

L.Class powers the OOP facilities of Leaflet and is used to create almost all of the Leaflet classes documented.

Hierarchy

Index

Constructor methods

Methods

Constructor methods

constructor(options?: ControlOptions): Control

Creates a control with the given options.

Parameters

Returns

Control

Methods

public addInfo(info: string): any

Adds an info string to infoControl.

Parameters

  • info: string

Returns

any

public addTo(map: Map): Control

Adds the control to the map.

Parameters

Returns

Control

public getContainer(): HTMLElement

Returns the HTML container of the control.

Returns

HTMLElement

public getPosition(): string

Returns the current position of the control.

Returns

string

public onAdd(map: Map): any

Parameters

Returns

any

public onRemove(map: Map): any

Parameters

Returns

any

public removeFrom(map: Map): Control

Removes the control from the map.

Parameters

Returns

Control

public removeInfo(info: string): any

Removes an info string from infoControl

Parameters

  • info: string

Returns

any

public setPosition(position: string): Control

Sets the position of the control. See control positions.

Parameters

  • position: string

Returns

Control