Skip to content
Maptoolkit Maps JS

Maptoolkit Maps JS

Maps JS is the Maptoolkit JavaScript library for embedding interactive maps in web applications. It is built on top of MapLibre GL JS and extends it with Maptoolkit-specific controls, styles, and services.

You’ll need a Maptoolkit API key for production use - see Authentication to get one.

Installation

npm

npm install @maptoolkit/maps
import { Map } from "@maptoolkit/maps";
import "@maptoolkit/maps/css";

CDN

<script src="https://unpkg.com/@maptoolkit/[email protected]/dist/maptoolkit.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@maptoolkit/[email protected]/dist/maptoolkit.css" />

When using the CDN, all exports are available as maptoolkit.Map, maptoolkit.Marker, maptoolkit.STYLES, etc.

Basic usage

npm / bundler

import { Map } from "@maptoolkit/maps";
import "@maptoolkit/maps/css";

const map = new Map({
  container: "map",
  apiKey: "your-api-key",
  center: [16.37, 48.21],
  zoom: 12,
});

CDN

<div id="map" style="width: 100%; height: 400px;"></div>
<script>
  const map = new maptoolkit.Map({
    container: "map",
    apiKey: "your-api-key",
    center: [16.37, 48.21],
    zoom: 12,
  });
</script>

Previous versions

The following versions are deprecated and no longer receive feature updates. They are listed here for reference only.

VersionNotes
Maps JS v10Deprecated. Predecessor to current Maps JS.
Maps JS v8Deprecated. Leaflet based library for raster tiles, security updates only.