MapLibre GL JS renders map styles with WebGL from vector tiles in web pages or webviews. It continues the open mapbox-gl-js lineage after Mapbox’s license change.
Overview
MapLibre GL JS is a TypeScript library for showing interactive maps in browsers and webview-based applications. It draws vector tiles on the GPU for responsive panning and zooming, and map appearance follows the MapLibre Style Spec.
The project began as a community fork of mapbox-gl-js when Mapbox moved newer releases away from open licensing. Early releases aimed to be a drop-in replacement for the last open Mapbox GL JS generation while the codebase has since added its own features. Bindings exist for React and Angular, with additional resources listed in community catalogs.
Developers install via npm or load ES modules from a CDN, configuring worker URLs for bundlers such as Vite, webpack, esbuild, Rollup, or Next.js. Documentation covers map controls, markers, popups, sources, events, and CSP considerations for workers and images.
MapLibre GL JS is the web counterpart to MapLibre Native on mobile and other platforms within the broader MapLibre ecosystem.
Key features
- WebGL vector tile rendering
- MapLibre Style Spec styling
- Markers, popups, and map controls
- ESM bundler and CDN installs
- Worker URL configuration helpers
- React and Angular bindings available
- GPU-accelerated map display
- Content security policy guidance
Use cases
- Embedding maps in web applications
- Webview map UIs in hybrid apps
- Custom-styled interactive basemaps
- Migrating from legacy Mapbox GL OSS
- Data visualization on geographic canvases
Open-source alternative to
Mapbox“The library's initial versions (1.x) were intended to be a drop-in replacement for the Mapbox’s OSS version (1.x) with additional functionality, but have evolved a lot since then.” source