Làm việc với trình kết xuất Thẻ thông tin 3D của riêng bạn
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Nhà phát triển ở Khu vực kinh tế Châu Âu (EEA)
Nếu không thể kết hợp sản phẩm kết xuất của bên thứ ba vào giải pháp của mình, thì bạn có thể phải tạo trình kết xuất 3D Tiles của riêng mình. Phương pháp này đòi hỏi bạn phải cân nhắc những yếu tố quan trọng sau:
Khi phân phát Ô 3D ảnh thực tế, Map Tiles API sẽ trả về URI cho các nhóm ô con. Các URI tập hợp ô này không phải là URL thông thường. Chúng chỉ bao gồm thành phần đường dẫn và tham số. Chúng không chứa khoá API của bạn (bắt buộc để uỷ quyền cho yêu cầu của bạn). Để biết thêm thông tin, hãy xem Quy cách về ô 3D.
Yêu cầu và phản hồi
Sau đây là một số ví dụ về yêu cầu và phản hồi của Ô 3D ảnh thực tế. Bạn có thể kiểm tra các phần tử này bằng Công cụ cho nhà phát triển Chrome.
Bạn nên đính kèm mọi tham số xuất hiện trong URI của bộ ô, cùng với khoá API của bạn, khi tạo các yêu cầu ô tiếp theo. 3D Tiles API cung cấp 2 tham số sau:
session
Giá trị nhận dạng tích hợp cho một phiên tải 3D. API sẽ tự động tạo mã này. Trình kết xuất phải đính kèm mã này khi tạo các yêu cầu về ô tiếp theo.
key
Khoá API mà bạn đã dùng để truy cập vào dịch vụ 3D Tiles. Bạn phải đính kèm mã này vào tất cả các yêu cầu về ô tiếp theo.
Thông tin ghi nhận sự đóng góp hiển thị
Ghi công có nghĩa là xác nhận nguồn của các ô bản đồ và là một yêu cầu bắt buộc để sử dụng API này – bao gồm cả việc ghi công thương hiệu Google (biểu trưng) cũng như việc ghi công dữ liệu. Bạn có thể xem biểu trưng của Google trên trang Chính sách về Map Tiles API. Thông tin về việc phân bổ dữ liệu được trả về trong mọi phản hồi của ô. Hãy tìm trong ô glTF, trong asset, copyright.
{"asset":{"version":"2.0","generator":"draco_decoder","copyright":"Data SIO, NOAA, U.S. Navy, NGA, GEBCO;Landsat / Copernicus"}}
Bạn phải tổng hợp, sắp xếp và hiển thị thông tin này trên một dòng văn bản, thường ở cuối quá trình kết xuất. Việc này bao gồm các bước sau:
Trích xuất tất cả thông tin bản quyền từ tất cả các ô đang hiển thị.
Phân tách nhiều nguồn bản quyền bằng dấu chấm phẩy.
Sắp xếp thông tin dựa trên số lần xuất hiện.
Hiển thị các nguồn bản quyền trên màn hình, sắp xếp từ nguồn xuất hiện nhiều nhất đến ít nhất, tương tự như cách Google Earth thực hiện.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-09-04 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."]]