Come creare mappe topografiche - Servizio di posizione Amazon

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

Come creare mappe topografiche

Amazon Location Service ti consente di creare mappe topografiche utilizzando le funzionalità di densità del terreno e del contorno per visualizzare le variazioni di altitudine e le caratteristiche geografiche.

Mostra Hillshade

La funzione Terrain consente di visualizzare Hillshade, i cambiamenti di quota e le relative caratteristiche geografiche.

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%; }

Mostra l'elevazione con le linee Contour Density

Amazon Location Service ti consente di aggiungere funzionalità Contour Density alla tua mappa. Ciò fornisce la visualizzazione della pendenza geografica e delle variazioni di altitudine.

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%; }

Mostra entrambe le linee Hillshade e Contour Density

Con Amazon Location Service puoi combinare le funzionalità Hillshade e Contour Density sulla tua mappa per una visualizzazione completa del terreno. Ciò offre una migliore percezione della profondità e una comprensione completa delle variazioni topografiche e delle caratteristiche del terreno.

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%; }