ทํางานกับตัวแสดงผลการ์ด 3 มิติของคุณเอง
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
นักพัฒนาแอปในเขตเศรษฐกิจยุโรป (EEA)
หากไม่สามารถรวมผลิตภัณฑ์การแสดงผลของบุคคลที่สามเข้ากับโซลูชันได้ คุณอาจต้องสร้างโปรแกรมแสดงผล 3D Tiles ของคุณเอง
แนวทางนี้กำหนดให้คุณต้องพิจารณาปัจจัยสำคัญต่อไปนี้
URL ของเนื้อหา
เมื่อแสดงชิ้นส่วนแผนที่ 3 มิติแบบสมจริง Map Tiles API จะแสดง URI สำหรับ
ชุดไทล์ย่อย URI ชุดไทล์เหล่านี้ไม่ใช่ URL ปกติ แต่มีเพียง
คอมโพเนนต์เส้นทางและพารามิเตอร์ โดยไม่มีคีย์ API ของคุณซึ่ง
จำเป็นต่อการให้สิทธิ์คำขอ ดูข้อมูลเพิ่มเติมได้ที่ข้อกำหนดของการ์ด 3 มิติ
คำขอและการตอบกลับ
ต่อไปนี้คือตัวอย่างคำขอและคำตอบของชิ้นส่วนแผนที่ 3 มิติแบบสมจริง คุณตรวจสอบได้โดยใช้เครื่องมือสำหรับนักพัฒนาซอฟต์แวร์ Chrome
ตัวอย่างคำขอชุดไทล์ราก
https://tile.googleapis.com/v1/3dtiles/root.json?key=YOUR_API_KEY
ตัวอย่าง URI การตอบกลับของชุดไทล์
/v1/3dtiles/datasets/CgA/files/UlRPVEYuYnVs.json?session=CIqhrPOFvdHSYg
ตัวอย่าง URL คำขอไทล์ที่ตัวแสดงผลใช้
https://tile.googleapis.com/v1/3dtiles/datasets/CgA/files/UlRPVEYuYnVs.json?session=CIqhrPOFvdHSYg&key=YOUR_API_KEY
https://tile.googleapis.com/v1/3dtiles/datasets/CgA/files/UlRPVEYubm9k.glb?session=CIqhrPOFvdHSYg&key=YOUR_API_KEY
คุณควรแนบพารามิเตอร์ที่ปรากฏใน URI ของชุดไทล์พร้อมกับ
คีย์ API เมื่อสร้างคำขอไทล์ที่ตามมา API ของไทล์ 3 มิติ
มีพารามิเตอร์ 2 รายการต่อไปนี้
session
- ตัวระบุในตัวสำหรับเซสชันการโหลด 3 มิติ สร้างขึ้นโดยอัตโนมัติ
โดย API โดยตัวแสดงผลต้องแนบมาด้วยเมื่อสร้างคำขอไทล์ที่ตามมา
key
- คีย์ API ที่คุณใช้เพื่อเข้าถึงบริการ 3D Tiles คุณต้องแนบมากับคำขอไทล์ทั้งหมดในภายหลัง
การระบุแหล่งที่มาของการแสดงผล
การระบุแหล่งที่มาหมายถึงการรับทราบแหล่งที่มาของไทล์แผนที่ และเป็นข้อกำหนดสำหรับการใช้ API นี้ ซึ่งรวมถึงการระบุแหล่งที่มาของแบรนด์ Google (โลโก้) และการระบุแหล่งที่มาของข้อมูล คุณดูโลโก้ Google ได้ในหน้านโยบาย Map Tiles API ระบบจะแสดงข้อมูลการระบุแหล่งที่มาของข้อมูล
ในคำตอบของไทล์ทุกรายการ มองหาในไทล์ glTF ในส่วน
asset
, copyright
{
"asset": {
"version": "2.0",
"generator": "draco_decoder",
"copyright": "Data SIO, NOAA, U.S. Navy, NGA, GEBCO;Landsat / Copernicus"
}
}
คุณต้องรวบรวม จัดเรียง และแสดงข้อมูลนี้ในบรรทัดข้อความ
โดยปกติจะอยู่ที่ด้านล่างของการแสดงผล ซึ่งประกอบด้วยขั้นตอนต่อไปนี้
ดึงข้อมูลลิขสิทธิ์ทั้งหมดจากไทล์ทั้งหมดที่อยู่ในมุมมอง
คั่นแหล่งที่มาของลิขสิทธิ์หลายแหล่งด้วยเซมิโคลอน
จัดเรียงข้อมูลตามจํานวนครั้งที่เกิด
แสดงแหล่งที่มาของลิขสิทธิ์บนหน้าจอ โดยเรียงจากแหล่งที่มาที่ใช้มากที่สุดไปน้อยที่สุด
ในลักษณะเดียวกับที่ Google Earth
ทำ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-29 UTC
[null,null,["อัปเดตล่าสุด 2025-08-29 UTC"],[[["\u003cp\u003eWhen building your own renderer for Photorealistic 3D Tiles, you need to handle content URLs, requests, and responses, and display attributions correctly.\u003c/p\u003e\n"],["\u003cp\u003eContent URLs for tilesets returned by the API are relative and require your API key to be added for subsequent requests.\u003c/p\u003e\n"],["\u003cp\u003eRequests for tiles must include both your API key and a session parameter provided in the initial tileset response.\u003c/p\u003e\n"],["\u003cp\u003eData attribution information is included in each tile's \u003ccode\u003easset.copyright\u003c/code\u003e property within the glTF and must be aggregated, sorted, and displayed appropriately in your application.\u003c/p\u003e\n"],["\u003cp\u003eYou are required to display both the Google logo and aggregated data attributions, similar to how Google Earth displays them, for compliance with API usage policies.\u003c/p\u003e\n"]]],[],null,["# Work with your own 3D Tiles renderer\n\n**European Economic Area (EEA) developers** If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google\n| Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. [Learn more](/maps/comms/eea/faq). In addition, certain content from the Map Tiles API will no longer be returned. [Learn more](/maps/comms/eea/map-tiles).\n\nIf you're not able to incorporate a third-party rendering product into your\nsolution, then you might have to create your own 3D Tiles renderer. This\napproach requires that you consider the following important factors:\n\n- [Content URLs](#content_urls)\n- [Requests and responses](#requests-and-responses)\n- [Display data attributions](#display-attributions)\n\nContent URLs\n------------\n\nWhen serving Photorealistic 3D Tiles, the Map Tiles API returns URIs for\nchildren tilesets. These tileset URIs are not regular URLs. They include only\nthe path and parameters component. They don't contain your API key, which is\nrequired to authorize your request. For more information, see the\n[3D Tiles Specification](https://docs.opengeospatial.org/cs/18-053r2/18-053r2.html#23).\n\nRequests and responses\n----------------------\n\nHere are some examples of Photorealistic 3D Tiles requests and responses. You\ninspect them by using the Chrome Developer Tools.\n\nSample root tileset request: \n\n https://tile.googleapis.com/v1/3dtiles/root.json?key=YOUR_API_KEY\n\nSample tileset response URI: \n\n /v1/3dtiles/datasets/CgA/files/UlRPVEYuYnVs.json?session=CIqhrPOFvdHSYg\n\nSample tile request URLs used by renderers: \n\n https://tile.googleapis.com/v1/3dtiles/datasets/CgA/files/UlRPVEYuYnVs.json?session=CIqhrPOFvdHSYg&key=YOUR_API_KEY\n\n https://tile.googleapis.com/v1/3dtiles/datasets/CgA/files/UlRPVEYubm9k.glb?session=CIqhrPOFvdHSYg&key=YOUR_API_KEY\n\nYou should attach any parameters that appear in the tileset URI, together with\nyour API key, when you construct the subsequent tile requests. The 3D Tiles API\nprovides the following two parameters:\n\n`session`\n: A built-in identifier for a 3D loading session. It's automatically generated\n by the API. It must be attached by the renderer when constructing the subsequent\n tile requests.\n\n`key`\n: The API key that you used to access 3D Tiles service. You must attach it to\n all subsequent tile requests.\n\nDisplay attributions\n--------------------\n\nAttribution means acknowledging the source of map tiles and is a requirement for\nuse of this API - this includes the Google brand attribution (logo) as well as\ndata attribution. The Google logo is available to you on the\n[Map Tiles API Policies](/maps/documentation/tile/policies) page. Data\nattribution information is returned in every tile response. Look for it in the\n[glTF tile](https://github.com/KhronosGroup/glTF), under\n`asset`, `copyright`. \n\n {\n \"asset\": {\n \"version\": \"2.0\",\n \"generator\": \"draco_decoder\",\n \"copyright\": \"Data SIO, NOAA, U.S. Navy, NGA, GEBCO;Landsat / Copernicus\"\n }\n }\n\nYou must aggregate, sort, and display this information on a line of text,\nusually at the bottom of the rendering. This entails the following steps:\n\n1. Extract all of the copyright information from all of the tiles in view.\n\n2. Separate multiple copyright sources with a semicolon.\n\n3. Sort the information based on the number of occurrences.\n\n4. Display the copyright sources on-screen, ordered from most occurrences to the\n least, similar to the way\n [Google Earth](https://earth.google.com)\n does it."]]