Skip to content

autk-map


autk-map / MapStyle

Class: MapStyle

Defined in: map-style.ts:9

Constructors

Constructor

new MapStyle(): MapStyle

Returns

MapStyle

Properties

_current

protected static _current: IMapStyle = MapStyle._default

Defined in: map-style.ts:37

Current map style


_currentStyle

protected static _currentStyle: string = 'default'

Defined in: map-style.ts:41

Current map style id


_default

protected static _default: IMapStyle

Defined in: map-style.ts:13

Default map style


_highlight

protected static _highlight: `#${string}` = '#5dade2'

Defined in: map-style.ts:32

Highlight color


_notFound

protected static _notFound: `#${string}` = '#FFFFFF'

Defined in: map-style.ts:28

Not found color

Accessors

currentStyle

Get Signature

get static currentStyle(): string

Defined in: map-style.ts:47

Get the current map style id

Returns

string

The current map style id

Methods

getColor()

static getColor(type): ColorRGB

Defined in: map-style.ts:55

Get the feature color

Parameters

type

keyof IMapStyle

Feature type

Returns

ColorRGB


getHighlightColor()

static getHighlightColor(): ColorRGB

Defined in: map-style.ts:95

Get the highlight color

Returns

ColorRGB

The highlight color


setCustomStyle()

static setCustomStyle(style): void

Defined in: map-style.ts:87

Set the feature color

Parameters

style

IMapStyle

new map style json

Returns

void


setPredefinedStyle()

static setPredefinedStyle(style): void

Defined in: map-style.ts:67

Set the feature color

Parameters

style

string

new map style in id: #rrggbb format

Returns

void

Released under the MIT License.