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.

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <link rel="stylesheet" href="https://maps-sdk.trimblemaps.com/v3/trimblemaps-3.0.0.css" />
        <script src="https://maps-sdk.trimblemaps.com/v3/trimblemaps-3.0.0.js"></script>
        <style>
            body { margin: 0; padding: 0; }

            #map {
                position: absolute;
                top: 0;
                bottom: 0;
                width: 100%;
            }

        </style>
    </head>
    <body>
        <div id="map"></div>

        <script>
            TrimbleMaps.APIKey = 'YOUR_API_KEY_HERE';
            const map = new TrimbleMaps.Map({
                container: 'map', // container id
                style: TrimbleMaps.Common.Style.DATALIGHT, // hosted style id
                center: [-98.38, 38.69], // starting position
                zoom: 3 // starting zoom
            });

            map.on('load', function() {
                map.setRoadSurfaceVisibility(true);
            });
        </script>
    </body>
</html>


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


Last updated April 27, 2021.