MapLibre GL JS
Interactive vector tile maps in WebGL2
README
MapLibre GL JS
MapLibre GL JS 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, 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
- ``` html
- <script src='https://unpkg.com/maplibre-gl@latest/dist/maplibre-gl.js'></script>
- <link href='https://unpkg.com/maplibre-gl@latest/dist/maplibre-gl.css' rel='stylesheet' />
- ```
- ``` html
- <div id='map' style='width: 400px; height: 300px;'></div>
- <script>
- var map = new maplibregl.Map({
- container: 'map',
- style: 'https://demotiles.maplibre.org/style.json', // stylesheet location
- center: [-74.5, 40], // starting position [lng, lat]
- zoom: 9 // starting zoom
- });
- </script>
- ```
Enjoy the map!
Documentation
Full documentation for this library is available here.
Check out the features through examples.
| Showcases | | |
|---|---|
| ---- | ---- |
| |
