NPM
Install @openmapvn/openmapvn-gl
using NPM.
npm install @openmapvn/openmapvn-gl
You can then use the library in your project like this:
<div id="map"></div>
import maplibregl from '@openmapvn/openmapvn-gl';
import '@openmapvn/openmapvn-gl/dist/maplibre-gl.css';
const map = new maplibregl.Map({
container: 'map',
style: 'https://maptiles.openmap.vn/styles/day-v1/style.json',
center: [21.03024, 105.85237],
zoom: 15,
maplibreLogo: true
});