Skip to main content

Weather Alerts

The Weather Alerts layer displays overlays for various types of weather alerts. (North America only) The controls listed below can be used to interact with the Weather Alerts layer.

Weather Alert Layer

Set the visibility of the weather alert layer.

myMap.setWeatherAlertVisibility(true);

Get the visibility of the weather alert layer.

const alertVisible = myMap.isWeatherAlertVisible();

Toggle the visibility of the weather radar layer.

myMap.toggleWeatherAlertVisibility();

Weather Alert Click Control

The click control makes the weather alerts on the map clickable. A popup with alert details is shown when the alert is clicked.

Weather Alert Click Control

var ctrl = new TrimbleMaps.WeatherAlertClickControl();
myMap.addControl(ctrl);

Weather Alert Legend Control

(Deprecated in v3.12. Use WeatherAlertFilterControl)

var ctrl = new TrimbleMaps.WeatherAlertLegendControl();
myMap.addControl(ctrl);

Weather Alert Filter Control

Weather Alert Filter Control

var ctrl = new TrimbleMaps.WeatherAlertFilterControl();
myMap.addControl(ctrl);

The Weather Alert Filter control can also accept parameters to set the filters and control visibility.

Parameter Type Description
severity
string
Default: All
Filters results based on the alert severity.
  • All
  • Extreme
  • Severe
  • Moderate
  • Minor
  • Unknown
urgency
string
Default: All
Filters results based on the alert urgency.
  • All
  • Immediate
  • Expected
  • Future
  • Past
  • Unknown
certainty
string
Default: All
Filters results based on the alert certainty.
  • All
  • Observed
  • Likely
  • Possible
  • Unlikely
  • Unknown
eventNames
array
Array of event names.
isVisible
boolean
Default: true
Controls the visibility of the selection controls.
var ctrl = new TrimbleMaps.WeatherAlertFilterControl({
  severity: "Moderate",
  isVisible: false
});
myMap.addControl(ctrl);
Last updated May 20, 2024.