maplibre-gl-js
MapLibre GL JS - Interactive vector tile maps in the browser
An open-source JavaScript library for embedding fast, interactive maps into websites, renders maps using the GPU so users can pan, zoom, rotate, and tilt smoothly in their browser without reloading images.
MapLibre GL JS is an open-source JavaScript library for embedding interactive maps into websites and web-based apps. It renders maps using the GPU, which means maps can display large amounts of geographic data smoothly and allow users to pan, zoom, rotate, and tilt in real time directly in a browser tab, without loading new images from a server.
The project started as a community fork of a popular commercial mapping library called mapbox-gl-js after that library's developers changed its license in December 2020 to restrict open-source use. MapLibre GL JS keeps the same core approach and is designed to be a compatible replacement, though it has since grown and changed on its own path.
To add a map to a web page, you include two small files (a stylesheet and a script), create a div element to hold the map, and write a few lines of JavaScript specifying the map center coordinates and zoom level. The library handles the rest: fetching map tile data, drawing roads and buildings and labels, and responding to user interaction. The README shows the complete working example in about ten lines of code.
Beyond basic maps, the library supports 3D terrain, animated layers, heatmaps, building extrusion, population density visualization, and custom data overlays. There are official bindings for React and Angular if you are using those frameworks. Sponsors include Microsoft and AWS, which fund ongoing development.
The project is community governed and welcomes contributors. It uses a three-part open-source license (BSD 3-Clause) and has full API documentation and a large example gallery available at maplibre.org.
Where it fits
- Embed an interactive map with pan, zoom, and tilt on a website using just a few lines of JavaScript.
- Visualize geographic data as heatmaps, custom overlays, or 3D building extrusions on a web map.
- Replace Mapbox GL JS with a fully open-source alternative that keeps the same API and works without a commercial license.
- Build a React or Angular app with an interactive map using the official MapLibre framework bindings.