gitmyhub

mapbox-gl-js

TypeScript ★ 12k updated 2d ago

Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL

A JavaScript library that renders fast, interactive, and customizable maps in web browsers using WebGL for smooth 3D terrain, real-time rotation, and fluid zoom transitions.

TypeScriptJavaScriptWebGLsetup: moderatecomplexity 3/5

Mapbox GL JS is a JavaScript library for displaying interactive, customizable maps inside a web browser. It renders maps using WebGL, a technology that uses the device's graphics hardware to produce smooth, high-performance visuals including 3D terrain, real-time rotation, and fluid zoom transitions that would be too slow with standard web rendering.

The library uses two key specifications to drive its output. Map styles are defined in the Mapbox Style Specification, a format that describes which colors, fonts, and layers to show. The map data itself comes from vector tiles: small packets of geographic data that the library assembles and draws on the user's device rather than downloading a pre-rendered image from a server. This approach allows the visual style to be changed without fetching new images, and it makes very detailed zooming possible.

Mapbox GL JS is the browser component of a larger cross-platform system. The same map styles and data can be used in companion SDKs for Android, iOS, macOS, and React Native mobile apps, meaning a developer can create a single visual style and apply it consistently across web and mobile products. Capabilities shown in the documentation include custom point clusters, hexbin data visualizations, satellite imagery layers, 3D terrain with custom markers, and data-driven styling.

Using the library requires a Mapbox account. The license is tied to Mapbox's terms of service rather than a traditional open-source license, so it is not freely usable outside of Mapbox's platform and pricing structure.

Where it fits