Skip to main content

Route Modifiers Add-on

The Route Modifiers add-on allows control of the Route Modifiers layer on the map. Route modifiers are road segments you want the routing algorithm to avoid or favor when generating a route. Route modifiers are created in the ContentTools web tool, and linked to your API key.

Example setup

View a working demo and follow the steps below to create your own.

<link href="" rel="stylesheet">
<!-- Route Modifiers addon reference css -->
<script src=""></script>
<!-- Route Modifiers addon reference js -->

var map = ( = new TrimbleMaps.Map({
  container: "map",
  style: TrimbleMaps.Common.Style.TRANSPORTATION,
  zoom: 12.5,
  center: [-77.01866, 38.888],
  region: TrimbleMaps.Common.Region.NA,

// setup the Route Modifiers control
const modifierOptions = {
  isVisible: true,
const modifiersControl = new TrimbleMapsControl.RouteModifiers(modifierOptions);

// add control to map
map.addControl(modifiersControl, "top-right");

// once the map is loaded, load the AF Sets
myMap.once("load", () => {
  console.log("AF SETS from the ControlPanel: ", modifiers.getAFSets());

Customization Options

Parameter Type/Values Description
Specifies if the layer is should be displayed. Default true
Last updated September 15, 2023.