MapLibre GL JS

GPU-accelerated, open-source WebGL library for interactive vector tile maps

Library
npm
v6.4.1
11,377stars
BSD 3-Clause License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
94/100Excellent
Development Activity100
Maintenance100
Community76
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
86/100Excellent
Architecture87
Code Quality88
Innovation85
Learning Curve82

MapLibre GL JS is an open-source JavaScript library for publishing interactive maps on websites and webview-based apps, using GPU-accelerated vector tile rendering for smooth panning, zooming, and rotation. It originated as a community fork of mapbox-gl-js after Mapbox moved to a non-OSS license in December 2020, and has since evolved well beyond drop-in compatibility with new capabilities like 3D terrain, globe projection, and custom WebGL layers.

The library exposes a Map class as its central entry point, backed by a style-driven rendering pipeline (vector tiles, raster tiles, GeoJSON, images, video) and a worker-based tile-processing architecture that keeps the main thread responsive. It ships as an ESM/CJS bundle with full TypeScript typings and integrates with React, Angular, and other frontend stacks via community bindings.

What You Get

  • A Map class with a declarative, JSON-based style specification for controlling every visual layer (fill, line, symbol, raster, heatmap, hillshade, background, custom layers)
  • Built-in navigation, geolocation, scale, fullscreen, terrain, and globe UI controls, plus draggable markers and popups
  • Support for vector tiles, raster tiles, GeoJSON sources (with clustering), image/video overlays, and 3D terrain/hillshade rendering
  • A CustomLayerInterface for injecting raw WebGL rendering code directly into the map’s render pipeline
  • A worker-pool architecture that offloads tile parsing and geometry tessellation off the main thread to keep interactions smooth
  • First-class TypeScript typings and an addProtocol API for intercepting and customizing tile/resource fetches (e.g. PMTiles)

Common Use Cases

  • Embedding an interactive, self-hosted or vendor-neutral map in a web application without paying per-load API fees
  • Building GIS and data-visualization dashboards that render large GeoJSON datasets, choropleths, or heatmaps over a basemap
  • Rendering 3D terrain, hillshading, and globe-projection views for outdoor, aviation, or geospatial-analysis tools
  • Replacing mapbox-gl-js in existing codebases that need to stay on an OSS license
  • Building custom WebGL visualizations (weather layers, satellite imagery, real-time tracking) on top of a maintained tile-rendering core via CustomLayerInterface

Under The Hood

Architecture - The library is organized around a central Map class (src/ui/map.ts, ~4,500 lines) that owns a Style (src/style/style.ts), a Transform/camera model, and a Painter (src/render/painter.ts) that issues the actual WebGL draw calls each frame. Data flows from tile sources (vector, raster, GeoJSON, raster-DEM, image, video — each in src/source/) through a worker pool (src/util/dispatcher.ts, src/util/actor.ts) that parses and tessellates tile geometry off the main thread, then hands prepared buffers back to the painter for rendering against the active style’s paint/layout properties. Style layers (fill, line, symbol, raster, hillshade, background, custom) each define their own bucket/program pairing, and a CustomLayerInterface lets host applications splice raw WebGL calls directly into this render loop, giving the architecture a plugin-like extension point without forking the renderer.

Tech Stack - Written entirely in TypeScript (~88% of the codebase) with a small amount of GLSL for shaders (2.4%) and CSS for UI chrome. Core dependencies are deliberately narrow and mostly maintained under the @maplibre or @mapbox scopes: @maplibre/maplibre-gl-style-spec for style validation, @maplibre/geojson-vt and @mapbox/vector-tile for tiling, earcut for polygon triangulation, gl-matrix for linear algebra, and pbf for protobuf decoding of vector tiles. The project builds with Rolldown, tests with Vitest across separate unit/integration/build/render configs, lints with ESLint and Stylelint, and generates its public typings via a dedicated generate-typings build step, publishing both ESM (dist/maplibre-gl.mjs) and full TypeScript declaration files.

Code Quality - The repository pairs almost every implementation file with a co-located *.test.ts (198 test files against 299 non-test source files), plus a separate integration suite (test/integration) and a dedicated render-regression suite (test/integration/render) that diffs rendered pixel output against reference images — a strong signal for a WebGL rendering library where visual regressions are otherwise easy to miss. Naming is consistent and domain-driven (geojson_source.ts, raster_dem_tile_worker_source.ts), error handling uses typed custom errors (AJAXError, GPUInitializationError), and the npm test script chains linting, unit, integration, render, and build tests together as a single CI gate.

API Design - The public surface is a single Map constructor plus a family of well-named control, source, and event classes, all re-exported from one src/index.ts entry point with full TypeScript types attached to every option object (MapOptions, StyleOptions, FlyToOptions, etc.). Getting started requires only a container element and a style URL/object, and the event system follows a consistent Evented/on/off pattern shared across Map, Popup, and Marker. The tradeoff for this breadth is a large API surface (dozens of exported types and control classes) and the style specification’s own JSON-schema learning curve, partially offset by extensive generated docs and a large official example gallery.

Used by 9 apps in this directory

TypeScript
97%
AGPL 3.0

Checkmate

Devops · Analytics · Monitoring

10,556

Self-hosted uptime and infrastructure monitoring with multi-protocol checks, global geo-coverage, and beautiful real-time dashboards.

View details
91
Repo Health
82
Technical
69
Dependency
Built with
TypeScript97%
Updated yesterday
TypeScript
80%
Other

Directus

CMS · Low Code Platforms

37,462

Connect any SQL database and get instant REST and GraphQL APIs, a visual management Studio, and a native MCP server for AI agents — free for most organizations.

View details
93
Repo Health
82
Technical
78
Dependency
Built with
TypeScript80%
Vue18%
Updated yesterday
TypeScript
94%
AGPL 3.0

Element Web

Team Chat · Collaboration

13,387

A polished, self-hostable Matrix client for secure, decentralized messaging and collaboration that puts your organization in full control of its data.

View details
96
Repo Health
83
Technical
67
Dependency
Built with
TypeScript94%
Updated today
TypeScript
53%
Apache 2.0

Flowsint

Automation · Developer Tools

7,669

A privacy-first, graph-based OSINT investigation platform with 30+ automated enrichers for mapping relationships between domains, IPs, people, and organizations.

View details
84
Repo Health
71
Technical
70
Dependency
Built with
TypeScript53%
Python45%
Updated 1 weeks ago
TypeScript
97%
Other

Kibana

Analytics · Monitoring

21,251

Your open source window into the Elastic Stack — query, visualize, and act on data stored in Elasticsearch with real-time dashboards, AI-assisted search, and automated alerting.

View details
98
Repo Health
87
Technical
68
Dependency
Built with
TypeScript97%
Updated today
Python
60%
MIT

LibrePhotos

File Storage

8,044

Self-hosted photo library with AI-powered face recognition, semantic search, and automatic event albums — no cloud required.

View details
82
Repo Health
78
Technical
67
Dependency
Built with
Python60%
TypeScript37%
Updated 3 days ago
Python
55%
Other

PostHog

Analytics · Monitoring · Developer Tools

37,777

The all-in-one open source product platform combining analytics, session replay, feature flags, error tracking, AI observability, and a built-in data warehouse in a single self-hostable stack.

View details
92
Repo Health
80
Technical
67
Dependency
Built with
Python55%
TypeScript36%
Updated today
Rust
77%
AGPL 3.0

Spacedrive

File Storage · Collaboration

38,790

One file manager for all your devices and clouds — powered by a Virtual Distributed File System built in Rust.

View details
60
Repo Health
84
Technical
65
Dependency
Built with
Rust77%
TypeScript20%
Updated 3 weeks ago
TypeScript
52%
Other

World Monitor

Monitoring · Analytics

83,076

Real-time global intelligence dashboard that fuses AI-synthesized news, geopolitical risk scoring, and infrastructure tracking into one open-source situational awareness platform.

View details
86
Repo Health
89
Technical
71
Dependency
Built with
TypeScript52%
JavaScript45%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search