NPM
Cài đặt thư viện ndamap-gl bằng NPM.
npm install ndamap-gl
Sau đó b ạn có thể dùng thư viện của chúng tôi trong dự án của bạn theo cách sau:
<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>'
}
});