This is the documentation of version 1.0.0-rc.2. Go to the latest version, 1.0.0-rc.5.

Introduction to the map bundle

Map architecture

The map bundle, @tomtom-org/maps-sdk/map, renders through MapLibre GL JS, a peer dependency, and adds TomTom's styles, data and services on top. It has two parts.

TomTomMap: the foundation

TomTomMap wraps MapLibre's Map. It:

Modules: extensible functionality

Modules each add one capability to the map. There are two kinds:

The module reference lists them all.

Why this architecture?

Adding modules

import { RoutingModule, TrafficFlowModule } from '@tomtom-org/maps-sdk/map';

// Style-owned: the one traffic flow module of this map
const trafficFlowModule = await TrafficFlowModule.get(map, { visible: true });

// Data-owned: a new routing module, for routes you calculate
const routingModule = await RoutingModule.create(map);

Next steps