Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.
Cara membuat peta topografi
Amazon Location Service memungkinkan Anda membuat peta topografi menggunakan fitur kepadatan Terrain dan Contour untuk memvisualisasikan perubahan elevasi dan karakteristik geografis.
Tampilkan Hillshade
Fitur Terrain memungkinkan Anda memvisualisasikan Hillshade, perubahan ketinggian, dan fitur geografis terkait.
- index.html
-
<!DOCTYPE html>
<html lang="en">
<head>
<title>Terrain Map</title>
<meta charset='utf-8'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel='stylesheet' href='https://unpkg.com/maplibre-gl@5.x/dist/maplibre-gl.css' />
<script src='https://unpkg.com/maplibre-gl@5.x/dist/maplibre-gl.js'></script>
</head>
<body style="margin: 0; padding: 0;">
<div id="map" style="width: 100%; height: 100vh;"></div>
<script>
const apiKey = "Add Your Api Key";
const mapStyle = "Standard";
const awsRegion = "us-east-1";
const map = new maplibregl.Map({
container: 'map',
style: `https://maps.geo.${awsRegion}.amazonaws.com/v2/styles/${mapStyle}/descriptor?terrain=Hillshade&key=${apiKey}`,
center: [-119.5383, 37.8651], // Yosemite coordinates for terrain visibility
zoom: 12,
validateStyle: false, // Disable style validation for faster map load
});
</script>
</body>
</html>
- style.css
-
body { margin: 0; padding: 0; }
html, body, #map { height: 100%; }
Tampilkan elevasi dengan garis Kepadatan Kontur
Amazon Location Service memungkinkan Anda menambahkan fitur Contour Density ke peta Anda. Ini memberikan visualisasi kecuraman geografis dan perubahan ketinggian.
- index.html
-
<!DOCTYPE html>
<html lang="en">
<head>
<title>Contour Map</title>
<meta charset='utf-8'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel='stylesheet' href='https://unpkg.com/maplibre-gl@5.x/dist/maplibre-gl.css' />
<script src='https://unpkg.com/maplibre-gl@5.x/dist/maplibre-gl.js'></script>
</head>
<body style="margin: 0; padding: 0;">
<div id="map" style="width: 100%; height: 100vh;"></div>
<script>
const apiKey = "Add Your Api Key";
const mapStyle = "Standard";
const awsRegion = "us-east-1";
const map = new maplibregl.Map({
container: 'map',
style: `https://maps.geo.${awsRegion}.amazonaws.com/v2/styles/${mapStyle}/descriptor?contour-density=Medium&key=${apiKey}`,
center: [-119.3047, 37.7887],
zoom: 12,
validateStyle: false, // Disable style validation for faster map load
});
</script>
</body>
</html>
- style.css
-
body { margin: 0; padding: 0; }
html, body, #map { height: 100%; }
Tampilkan garis Hillshade dan Contour Density
Dengan Amazon Location Service, Anda dapat menggabungkan fitur Hillshade dan Contour Density di peta Anda untuk visualisasi medan yang komprehensif. Ini memberikan persepsi kedalaman yang ditingkatkan dan pemahaman lengkap tentang variasi topografi dan karakteristik medan.
- index.html
-
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hillshade and Contour Map</title>
<meta charset='utf-8'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel='stylesheet' href='https://unpkg.com/maplibre-gl@5.x/dist/maplibre-gl.css' />
<script src='https://unpkg.com/maplibre-gl@5.x/dist/maplibre-gl.js'></script>
</head>
<body style="margin: 0; padding: 0;">
<div id="map" style="width: 100%; height: 100vh;"></div>
<script>
const apiKey = "Add Your Api Key";
const mapStyle = "Standard";
const awsRegion = "us-east-1";
const map = new maplibregl.Map({
container: 'map',
style: `https://maps.geo.${awsRegion}.amazonaws.com/v2/styles/${mapStyle}/descriptor?contour-density=Medium&terrain=Hillshade&key=${apiKey}`,
center: [-119.3047, 37.7887],
zoom: 12,
validateStyle: false, // Disable style validation for faster map load
});
</script>
</body>
</html>
- style.css
-
body { margin: 0; padding: 0; }
html, body, #map { height: 100%; }