Skip to content

@smartmaps/smartmaps-gl


@smartmaps/smartmaps-gl / BrandControl

Class: BrandControl

Shows the control with logo and link on the map

Remarks

shows SartmapsLogo by standard, can be enabled/disabled with the smartmapsLogo option MapOptions

Implements

Constructors

Constructor

new BrandControl(options?): BrandControl

Parameters

options?

Partial\<BrandOptions> = {}

the control's options

Returns

BrandControl

Methods

getDefaultPosition()

getDefaultPosition(): ControlPosition

Optionally provide a default position for this control. If this method is implemented and Map.addControl is called without the position parameter, the value returned by getDefaultPosition will be used as the control's position.

Returns

ControlPosition

a control position, one of the values valid in addControl.

Implementation of

IControl.getDefaultPosition


onAdd()

onAdd(): HTMLElement

Register a control on the map and give it a chance to register event listeners and resources. This method is called by Map.addControl internally.

Returns

HTMLElement

The control's container element. This should be created by the control and returned by onAdd without being attached to the DOM: the map will insert the control's element into the DOM as necessary.

Implementation of

IControl.onAdd


onRemove()

onRemove(): void

Unregister a control on the map and give it a chance to detach event listeners and resources. This method is called by Map.removeControl internally.

Returns

void

Implementation of

IControl.onRemove