explaingit

maptalks/maptalks.js

4,515HTMLAudience · developerComplexity · 3/5Setup · moderate

TLDR

JavaScript library for displaying interactive 2D and 3D maps in web browsers, powered by WebGL for hardware-accelerated rendering with support for vector tiles, 3D Tiles, and GLTF models.

Mindmap

mindmap
  root((maptalks.js))
    What it does
      2D map rendering
      3D map rendering
      WebGL acceleration
    Data formats
      Vector tiles
      3D Tiles
      GLTF models
    Tech stack
      JavaScript
      WebGL
      npm
    Use cases
      Web app maps
      City 3D models
      Custom visualizations
    Audience
      Web developers
      GIS developers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Embed an interactive 2D or 3D map with custom data visualizations into a web app using WebGL-based rendering.

USE CASE 2

Display 3D city models or terrain on a map by loading 3D Tiles and GLTF model formats.

USE CASE 3

Build a high-performance map with multiple layer types (vector tiles, 3D, video) sharing one WebGL context.

USE CASE 4

Add a map to a project without a build system by including the library via a CDN script tag.

Tech stack

JavaScriptWebGLnpm

Getting it running

Difficulty · moderate Time to first run · 30min

Install via npm/yarn/pnpm or CDN script tag, the canvas-to-WebGL migration means some older API patterns may differ in maptalks-gl.

In plain English

maptalks.js (now upgrading to maptalks-gl) is a JavaScript library for displaying interactive maps in web browsers. It handles both 2D and 3D map rendering, and the newer maptalks-gl version is built entirely on WebGL, the browser technology used for hardware-accelerated graphics. The project is used for embedding maps with custom data visualizations into web applications. The library works with standard map data formats. Vector tiles are a format where map geometry (roads, buildings, boundaries) is served as compact binary data and rendered client-side in the browser, giving smooth zooming and styling control. The library also supports 3D Tiles, a format for streaming large 3D datasets like city models or terrain, and GLTF, a standard format for 3D models. This makes it possible to build maps that show real geographic data alongside 3D objects. The library is structured as a collection of packages. The core map handles the viewport, zoom, and pan controls. Separate layer packages handle vector tiles, 3D tiles, GLTF models, and video overlays. A group layer system lets multiple layer types render together in a shared WebGL context for better performance. Optional transcoder plugins handle compressed texture and geometry formats for users who need them. Installation is through npm, yarn, or pnpm. The library can also be included via a CDN script tag for projects that are not using a build system. The README notes that the library is actively being developed and the maptalks-gl version includes performance improvements and 3D analysis tools like traffic simulation. The repository is in the process of migrating from an older canvas-based rendering system to the WebGL-based maptalks-gl. Both the old and new source code live in this repository during the transition.

Copy-paste prompts

Prompt 1
Set up a maptalks-gl map in my web app that displays vector tiles from a public tile server with custom styling.
Prompt 2
How do I add a GLTF 3D model at a specific latitude and longitude on a maptalks.js map?
Prompt 3
Show me how to use a maptalks group layer to render vector tiles and 3D tiles together in the same WebGL context for better performance.
Prompt 4
How do I initialize a maptalks map with zoom and pan controls, then add a video overlay layer on top?
Prompt 5
What is the difference between the old canvas-based maptalks and the new maptalks-gl, and how do I migrate?
Open on GitHub → Explain another repo

← maptalks on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.