NPM
Install ndamap-gl using NPM.
npm install ndamap-gl
You can then use the library in your project like this:
<div id="map"></div>
import ndamapgl from 'ndamap-gl';
import 'ndamap-gl/dist/ndamap-gl.css';
const map = new ndamapgl.Map({
container: 'map',
style: 'https://maptiles.ndamaps.vn/styles/day-v2/style.json?apikey=YOUR_API_KEY',
center: [21.03024, 105.85237],
zoom: 15,
ndamapLogo: true,
attributionControl: {
compact: true,
customAttribution: 'Dữ liệu bản đồ 2026 <a href="https://ndamaps.vn/" target="_blank">© NDAMAPS</a> <a href="https://44plus.vn/" target="_blank">© 44+ Technologies</a>'
}
});