Map Layers

Contents

The TrimbleMaps Map includes several default layers. The visibility for each layer can be set, retrieved, or toggled.

Traffic #

The Traffic layer displays an overlay that is color coded to indicate the flow of traffic on the roads.

Traffic Layer

Set the visibility of the traffic layer.

myMap.setTrafficVisibility(true);

Get the visibility of the traffic layer.

const trafficVisible = myMap.isTrafficVisible();

Toggle the visibility of the traffic layer.

myMap.toggleTrafficVisibility();

Weather Radar #

The Weather Radar layer displays a radar overlay on the map.

Radar Layer

Set the visibility of the weather radar layer.

myMap.setWeatherRadarVisibility(true);

Get the visibility of the weather radar layer.

const radarVisible = myMap.isWeatherRadarVisible();

Toggle the visibility of the weather radar layer.

myMap.toggleWeatherRadarVisibility();

Weather Alerts #

The Weather Alerts layer displays overlays for various types of weather alerts. 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 #

Weather Alert Legend Control

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);

Road Surface #

The road surface layer allows you to display road surface conditions as a map tile overlay. Once this layer is added, it will display a road surface data overlay that is color coded to indicate the flow of condition on the roads currently visible in the map.

The color legend for Road Surface map is as follows:

  • Not in range
  • Dry road
  • Wet road
  • Ice/snow
  • Mix water/snow
  • Dew
  • Melting snow
  • Frost
  • Icing rain



Road Surface Layer

Set the visibility of the road surface layer.

myMap.setRoadSurfaceVisibility(true);

Get the visibility of the road surface layer.

const roadSurfaceVisible = myMap.isRoadSurfaceVisible();

Toggle the visibility of the road surface layer.

myMap.toggleRoadSurfaceVisibility();

Points of Interest (POI) #

POI Layer

Set the visibility of the POI layer.

myMap.setPOIVisibility(true);

Get the visibility of the POI layer.

const poiVisible = myMap.isPOIVisible();

Toggle the visibility of the POI layer.

myMap.togglePOIVisibility();

3D Buildings #

3D Buildings Layer

Set the visibility of the 3D Building layer.

myMap.set3dBuildingVisibility(true);

Get the visibility of the 3D Building layer.

const buildingVisible = myMap.is3dBuildingVisible();

Toggle the visibility of the 3D Building layer.

myMap.toggle3dBuildingVisibility();
Last updated April 27, 2021.