Prerequisites
- A Terminal49 account.
- A publishable map API key. See Entitlements and Paid Features for access requirements.
- Familiarity with the Shipments API and Containers API.
containerId and shipmentId variables to the embedded map.
They relate to id attributes of the container and shipment objects that are returned by the API.
Embed the map on your website
Once you have the API key, you can embed the map on your website.Load the map assets
Copy and paste the code below and insert it on your website.
Once loaded, this will make the map code available through the global Just before the closing
window object.Just before the closing </head> tag, add the following link tag to load the map styles.</body> tag, add the following script tag to load the map code.Create a map instance
After the code is loaded, you can use the Notice that the
window.TntMap class to create a map instance.authToken option is required. This is where you pass your publishable map API key.Start the map
This tells the map to initialize and hook into the element designated during initialization.

Styling the map
All of the map styles are written as human-readable CSS classes and variables. You can use these to customize the map to your liking. The styles are written in BEM style as well as they’re scoped under a.tntm class to avoid style conflicts with your website.
Sizing
By default the map will take the full width of its container and some height. The map is expandable by clicking on the expand button on the bottom left corner of the map. You can also override the default styles to customize the map to your liking. For example, to tell the map to take 60% of the total viewport size when expanded, do the following:
Colors
Terminal49 exposes a number of CSS variables that you can use to customize the map colors. All of the variables are bound to the.tntm class to avoid style conflicts with your website.
--marker variants instead.
Additionally, the variables might require adjusting for different states of the map markers.
For example, to display markers ‘visited’ by a vessel as orange and others (in the ‘on-the-way’ state) as blue:
First, define the default, blue color:
