Home > @magiclane/maps-sdk > Warning

Warning class

Weather warning (hazard) active at a given location.

Warnings are returned by the current weather request (see WeatherService.getCurrent) and by the route forecast request (see WeatherService.getForecast); hourly / daily forecast requests never carry them.

Note: the current weather request filters warnings only by expiry, so a returned warning's onset may still be in the future - check startStamp when only currently active warnings are wanted. The route forecast applies both bounds against each route point ETA.

Weather

Signature:

export declare class Warning 

Constructors

Constructor

Modifiers

Description

(constructor)(type, name, severity, phenomenon, description, area, startStamp, endStamp, color, coverage)

Creates a Warning instance.

Properties

Property

Modifiers

Type

Description

area

string

color

Color

coverage

Marker[]

description

string

endStamp

Date | undefined

name

string

phenomenon

string

severity

string

startStamp

Date | undefined

type

string

Methods

Method

Modifiers

Description

fromJson(json)

static

Deserializes a JSON-compatible map to create an instance.