Demo Goong Maps API
by pvtd264
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hướng dẫn chuyển đổi Google Maps API sang Goong Maps API</title>
<script src='https://cdn.jsdelivr.net/npm/@goongmaps/[email protected]/dist/goong-js.js'></script>
<link href='https://cdn.jsdelivr.net/npm/@goongmaps/[email protected]/dist/goong-js.css' rel='stylesheet' />
</head>
<body>
<div id='map' style='width: 500px; height: 300px;'></div>
<script>
goongjs.accessToken = 'your maptiles key here';
var map = new goongjs.Map({
container: 'map',
style: 'https://tiles.goong.io/assets/goong_map_web.json', // stylesheet location
center: [105.85258524102564, 21.0287601], // starting position [lng, lat]
zoom: 9 // starting zoom
});
var marker = new goongjs.Marker()
.setLngLat([105.85258524102564, 21.0287601])// position add marker [lng, lat]
.addTo(map);
</script>
</body>
</html>