About Maps SDK for JavaScript

We have released some capabilities in the Maps SDK under Public Preview to collect feedback from the community.
While our goal is to keep the design of the interface stable, breaking changes will occur, particularly in the earlier versions.
The versions will follow a 0.MAJOR.MINOR pattern for the time being.
Stay tuned with our release CHANGELOG.md files.

Quickstart

  1. Get your TomTom API key:
  1. Install the SDK:
npm install @tomtom-org/maps-sdk
  1. Start building:

For more project setup details, see the Project Setup Guide .

Overview

Maps SDK JS is a JavaScript/TypeScript library for building applications using TomTom map display and geolocation APIs.

It leverages the power of MapLibre GL JS and GeoJSON to seamlessly integrate TomTom maps and services with convenient out-of-the-box support, while staying highly customizable and extensible.

import { TomTomConfig } from '@tomtom-org/maps-sdk/core';
import { TomTomMap } from '@tomtom-org/maps-sdk/map';
import './style.css';
import { API_KEY } from './config';

// (Set your own API key when working in your own environment)
TomTomConfig.instance.put({ apiKey: API_KEY, language: 'en-GB' });

new TomTomMap({
    mapLibre: {
        container: 'sdk-map',
        center: [4.8156, 52.4414],
        zoom: 8,
    },
});

Key Features

  • Interactive Maps: MapLibre-powered library for styled, service-compatible TomTom Maps
  • Comprehensive Services: Easy access to TomTom’s location APIs including search, routing, and geocoding
  • GeoJSON Support: Built-in compatibility with the widely-used geospatial data format
  • TypeScript Ready: Full TypeScript support with comprehensive type definitions
  • Modular Architecture: Use only the features you need with tree-shaking support

Where can you run it?

  • Web: Display and configure maps, search for places, plan routes, and interact with location data
  • Node.js: Server-side geocoding, route calculation, and data enrichment capabilities
  • React Native: Leverage TomTom location services from a single codebase

Bundles

The Maps SDK is made up of three bundles:

  • Core : Shared configuration, types, and utilities used across Map and Services bundles.
  • Map : MapLibre-powered library for interactive TomTom Maps with modules for places, routes, traffic, and more.
  • Services : GeoJSON services for TomTom location APIs: search, routing, geocoding, EV charging availability, and geometry data.

Next Steps