代码示例概览
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
GitHub 上的 Maps 3D SDK for Android 代码库提供了一系列示例应用,可帮助您开始使用并探索该 SDK 的功能。该代码库分为两个模块:
Maps3DSamples/ApiDemos:此模块使用 Kotlin 和 Android View 展示了基本的 API 功能。这是一个很好的起点,可帮助您了解地图实例化、相机操作和添加各种地图对象等核心概念。
Maps3DSamples/advanced:对于使用 Jetpack Compose 的开发者,此示例演示了如何将 Maps 3D SDK for Android 集成到声明性界面中。它利用辅助类将 SDK 基于 View 的架构与 Compose 连接起来,从而提供一种更现代的方法来构建具有 3D 地图的界面。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[],[],null,["# Code samples overview\n\nThe [Maps 3D SDK for Android repository on\nGitHub](https://github.com/googlemaps-samples/android-maps3d-samples)\nprovides a collection of sample apps to help you get started and explore the\ncapabilities of the SDK. The repository is organized into two modules:\n\n- [Maps3DSamples/ApiDemos](https://github.com/googlemaps-samples/android-maps3d-samples/tree/main/Maps3DSamples/ApiDemos):\n This module showcases the fundamental API features using Kotlin and Android\n Views. It's a great starting point to understand core concepts like map\n instantiation, camera manipulation, and adding various map objects.\n\n- [Maps3DSamples/advanced](https://github.com/googlemaps-samples/android-maps3d-samples/tree/main/Maps3DSamples/advanced):\n For developers using Jetpack Compose, this sample demonstrates how to\n integrate the Maps 3D SDK for Android into a declarative UI. It utilizes helper\n classes to bridge the SDK's View-based architecture with Compose, offering a\n more modern approach to building UIs with 3D maps."]]