พบกับแผนที่แบบใหม่ใน Google Maps Platform เร็วๆ นี้ การอัปเดตการจัดรูปแบบแผนที่นี้มีชุดสีเริ่มต้นใหม่ รวมถึงการปรับปรุงประสบการณ์และความสามารถในการใช้งานแผนที่ ระบบจะอัปเดตรูปแบบแผนที่ทั้งหมดโดยอัตโนมัติในเดือนมีนาคม 2025 หากต้องการทราบข้อมูลเพิ่มเติมเกี่ยวกับความพร้อมให้บริการและวิธีเลือกใช้ก่อนหน้านี้ โปรดดู
รูปแบบแผนที่ใหม่สำหรับ Google Maps Platform
ชิ้นส่วนภูมิประเทศ
ชิ้นส่วนภูมิประเทศคือชิ้นส่วนรูปภาพที่แสดงการแมปเงาภูเขาและเส้นชั้นความสูง ซึ่งรวมถึงลักษณะทางธรรมชาติ เช่น พืชพรรณ
การรับไทล์ภูมิประเทศ
คุณสามารถเริ่มส่งคำขอชิ้นส่วนแผนที่ภูมิประเทศได้หลังจากที่ได้รับโทเค็นเซสชัน
เนื่องจากโทเค็นเซสชันมีผลกับทั้งเซสชัน คุณจึงไม่ต้องระบุตัวเลือกแผนที่ในคำขอไทล์
ตัวอย่างโค้ดต่อไปนี้แสดงคําขอโทเค็นเซสชันทั่วไปสําหรับชิ้นส่วนแผนที่ภูมิประเทศ
curl -X POST -d '{
"mapType": "terrain",
"language": "en-US",
"region": "US",
"layerTypes": ["layerRoadmap"]
}' \
-H 'Content-Type: application/json' \
"https://tile.googleapis.com/v1/createSession?key=YOUR_API_KEY"
คุณจะได้รับชิ้นส่วนแผนที่ภูมิประเทศโดยส่งคำขอ HTTPS GET ดังที่แสดงในตัวอย่างต่อไปนี้
curl "https://tile.googleapis.com/v1/2dtiles/z/x/y?session=YOUR_SESSION_TOKEN&key=YOUR_API_KEY"
ตัวอย่างคำขอการ์ด
ลองดูตัวอย่างต่อไปนี้ ซึ่งขอชิ้นส่วนแผนที่ภูมิประเทศ 1 รายการที่มีการซูมระดับ 10 โดยมีพิกัด x และ y เป็น (192, 401)
curl "https://tile.googleapis.com/v1/2dtiles/10/192/401?session=YOUR_SESSION_TOKEN&key=YOUR_API_KEY" --output /tmp/example_tile.png
ตัวอย่างนี้ไม่มีข้อความตอบกลับจากเซิร์ฟเวอร์ แต่ระบบจะดาวน์โหลดการ์ดไปยังไฟล์ในเครื่องแทน

ดูข้อมูลเกี่ยวกับส่วนหัวของข้อความตอบกลับได้ที่การดึงข้อมูลล่วงหน้า การจัดเก็บแคช หรือการจัดเก็บเนื้อหา
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-02-25 UTC
[null,null,["อัปเดตล่าสุด 2025-02-25 UTC"],[[["Terrain tiles are image tiles that visually represent geographical features like hills, contours, and vegetation."],["To request terrain tiles, you first need to obtain a session token using your API key and specifying map parameters."],["You can then retrieve individual terrain tiles using an HTTPS GET request, providing the session token, API key, and desired tile coordinates (zoom level, x, and y)."],["Terrain tiles are downloaded directly as image files without a server response message, allowing easy integration into mapping applications."]]],["Terrain tiles, which include hillshade mapping, contour lines, and natural features, are accessed by first obtaining a session token via a POST request specifying the map type, language, region, and layer types. Subsequently, tiles are retrieved with HTTPS GET requests, providing the zoom level (z), x and y coordinates, and the session token. An example demonstrates requesting a tile at zoom level 10, with coordinates (192, 401). The tile data downloads to a local file, without a server response message.\n"]]