Skip to main content

Truck Restrictions

The truck restrictions layer allows you to display truck restrictions on the current map. By adding the TruckRestrictionClickControl, a truck restriction message popup shows after clicking on an restriction. TruckRestrictionFilterControl allows you to filter restriction categories by general, dimension and hazmat. Requires Trimble Maps v3.1.0 or later.

<!DOCTYPE html>
        <meta charset="utf-8" />
        <link rel="stylesheet" href="" />
        <script src=""></script>
            body { margin: 0; padding: 0; }

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

        <div id="map"></div>

            TrimbleMaps.APIKey = 'YOUR_API_KEY_HERE';
            const map = new TrimbleMaps.Map({
                container: 'map', // container id
                style: TrimbleMaps.Common.Style.TRANSPORTATION, // hosted style id
                center: [-74.011934, 40.708016], // starting position
                zoom: 16 // starting zoom
            const truckRestriction = new TrimbleMaps.TruckRestriction();
            const ctrlClick = new TrimbleMaps.TruckRestrictionClickControl();
            const ctrlFilter = new TrimbleMaps.TruckRestrictionFilterControl({ isVisible: true, category: 'All' });
            map.addControl(ctrlFilter, 'top-left');
            map.on('load', function() {
            map.on('truckrestriction', () => {
Last updated November 23, 2021.