Class GridControl

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 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 hide(): any

If a tooltip is currently shown by the gridControl, hide and close it.

Returns

any

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 setPosition(position: string): Control

Sets the position of the control. See control positions.

Parameters

  • position: string

Returns

Control

public setTemplate(template: string): any

Change the Mustache template used to transform the UTFGrid data in the map's interactivity into HTML for display.

Parameters

  • template: string

Returns

any