# maplibre-gl-js **Repository Path**: dxnima/maplibre-gl-js ## Basic Information - **Project Name**: maplibre-gl-js - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-11-10 - **Last Updated**: 2024-06-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ![MapLibre Logo](https://maplibre.org/img/maplibre-logo-big.svg) # MapLibre GL JS [![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg?style=flat)](LICENSE.txt) [![Version](https://img.shields.io/npm/v/maplibre-gl?style=flat)](https://www.npmjs.com/package/maplibre-gl) [![CI](https://github.com/maplibre/maplibre-gl-js/actions/workflows/test-all.yml/badge.svg)](https://github.com/maplibre/maplibre-gl-js/actions/workflows/test-all.yml) [![PRs](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](https://opensource.org/licenses/BSD-3-Clause) [![codecov](https://codecov.io/gh/maplibre/maplibre-gl-js/branch/main/graph/badge.svg)](https://codecov.io/gh/maplibre/maplibre-gl-js) **[MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/API/)** is an open-source library for publishing maps on your websites or webview based apps. Fast displaying of maps is possible thanks to GPU-accelerated vector tile rendering. It originated as an open-source fork of [mapbox-gl-js](https://github.com/mapbox/mapbox-gl-js), before their switch to a non-OSS license in December 2020. 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. ## Getting Started Include the JavaScript and CSS files in the `` of your HTML file. ``` html ``` Include the following code in the `` of your HTML file. ``` html
``` Enjoy the map!
## Documentation Full documentation for this library [is available here](https://maplibre.org/maplibre-gl-js/docs/API/). Check out the features through [examples](https://maplibre.org/maplibre-gl-js/docs/examples/). | Showcases | | | ---- | ---- | |![Display a map](https://maplibre.org/maplibre-gl-js/docs/assets/examples/simple-map.png) |![Third party vector tile source](https://maplibre.org/maplibre-gl-js/docs/assets/examples/3d-terrain.png) | |![Animate a series of images](https://maplibre.org/maplibre-gl-js/docs/assets/examples/animate-images.png) |![Create a heatmap layer](https://maplibre.org/maplibre-gl-js/docs/assets/examples/heatmap-layer.png) | |![3D buildings](https://maplibre.org/maplibre-gl-js/docs/assets/examples/3d-buildings.png) |![Visualize population density](https://maplibre.org/maplibre-gl-js/docs/assets/examples/visualize-population-density.png) |
## Migrating from mapbox-gl to maplibre The libraries are very similar but diverge with newer features happening from v2 in both libraries where Mapbox turned proprietary. The overall migration happens by uninstalling `mapbox-gl` and installing `maplibre-gl` in your node packages (or see below for CDN links), and replacing `mapboxgl` with `maplibregl` throughout your TypeScript, JavaScript and HTML/CSS. ```diff - var map = new mapboxgl.Map({ + var map = new maplibregl.Map({ -