MapLibre GL JS

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

Library
npm
v6.11.2
11,758 stars
BSD 3-Clause License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
94 /100 Excellent
Development Activity 100
Maintenance 100
Community 76
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
86 /100 Excellent
Architecture 87
Code Quality 88
Innovation 85
Learning Curve 82

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 10 apps in this directory

TypeScript
98%
AGPL 3.0

Checkmate

Analytics · Devops · Monitoring

10,895

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

View details
90
Repo Health
82
Technical
67
Dependency
Built with
TypeScript 98%
Updated 1 weeks ago
TypeScript
79%
Other

Directus

CMS · Low Code Platforms

37,987

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
92
Repo Health
82
Technical
76
Dependency
Built with
TypeScript 79%
Vue 19%
Updated 1 weeks ago
TypeScript
94%
AGPL 3.0

Element Web

Collaboration · Team Chat

13,518

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
65
Dependency
Built with
TypeScript 94%
Updated 5 days ago
TypeScript
53%
Apache 2.0

Flowsint

Automation · Developer Tools

8,978

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
67
Dependency
Built with
TypeScript 53%
Python 45%
Updated 1 weeks ago
TypeScript
98%
Other

Kibana

Analytics · Monitoring

21,301

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
63
Dependency
Built with
TypeScript 98%
Updated 4 days ago
Python
58%
MIT

LibrePhotos

File Storage

8,083

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

View details
83
Repo Health
78
Technical
65
Dependency
Built with
Python 58%
TypeScript 40%
Updated 5 days ago
Python
55%
Other

PostHog

Ab Testing Experimentation · Analytics · Developer Tools

39,975

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
65
Dependency
Built with
Python 55%
TypeScript 36%
Updated 4 days ago
Python
64%
AGPL 3.0

Shadowbroker

Analytics · Monitoring · Security

11,261

Self-hosted OSINT dashboard that fuses 60+ live intelligence feeds — flight tracking, ship AIS, satellites, CCTV, seismic and radio networks — into one real-time map, with an agent-ready command channel for AI co-analysts.

View details
84
Repo Health
83
Technical
71
Dependency
Built with
Python 64%
TypeScript 32%
Updated 1 weeks ago
Rust
77%
AGPL 3.0

Spacedrive

Collaboration · File Storage

39,041

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

View details
56
Repo Health
84
Technical
63
Dependency
Built with
Rust 77%
TypeScript 20%
Updated 2 months ago

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