vgrid-maplibre
Version:
DGGS Visualization for MapLibre GL JS
117 lines (85 loc) • 3.52 kB
Markdown
<p align="center">
<strong >vgrid-maplibre </strong> <br>
<b><i>DGGS Visualization on MapLibre GL JS</i><b>
</p>
<p align="center">
<img src="https://raw.githubusercontent.com/opengeoshub/vgridtools/main/images/readme/dggs.png">
</p>
[](https://www.npmjs.com/package/vgrid-maplibre)


[](https://opensource.org/licenses/MIT)
### [vgrid-maplibre on NPM](https://www.npmjs.com/package/vgrid-maplibre)
### [Vgrid Home](https://vgrid.vn)
### Basic usage (for H3 as an example)
```html
<html>
<head>
<title>vgrid-maplibre Demo</title>
<script src="https://unpkg.com/maplibre-gl@3.6.2/dist/maplibre-gl.js"></script>
<link href="https://unpkg.com/maplibre-gl@3.6.2/dist/maplibre-gl.css" rel="stylesheet" />
<style>
body {
margin: 0;
padding: 0;
}
#map {
width: 100%;
height: 100vh;
}
</style>
</head>
<body>
<div id="map"></div>
<script type="module">
import H3Grid from "https://unpkg.com/vgrid-maplibre/H3/H3Grid.js";
const map = new maplibregl.Map({
container: 'map',
style: 'https://raw.githubusercontent.com/opengeohubs/vstyles/main/vstyles/sbr/eclipse/eclipse.json',
center: [0, 0],
zoom: 0
});
map.on('load', () => {
const h3Grid = new H3Grid(map, {
color: 'rgba(255, 0, 0, 1)',
width: 1.5,
redraw: 'move',
});
});
</script>
</body>
</html>
```
### H3
[H3 Demo](https://gishub.vn/pages/dggs/h3/)

### S2
[S2 Demo](https://gishub.vn/pages/dggs/s2/)

### A5
[A5 Demo](https://gishub.vn/pages/dggs/a5/)

### QTM
[QTM Demo](https://gishub.vn/pages/dggs/qtm/)

### OLC (OpenLocationCode/ Google Pluscode)
[OLC Demo](https://gishub.vn/pages/dggs/olc/)

### Geohash
[Geohash Demo](https://gishub.vn/pages/dggs/geohash/)

### GEOREF
[GEOREF Demo](https://gishub.vn/pages/dggs/georef/)

### MGRS
[MGRS Demo](https://gishub.vn/pages/dggs/mgrs/)

### Tilecode
[Tilecode Demo](https://gishub.vn/pages/dggs/tilecode/)

### Maidenhead
[Maidenhead Demo](https://gishub.vn/pages/dggs/maidenhead/)

### GARS
[GARS Demo](https://gishub.vn/pages/dggs/gars/)