自定义地图
您可以通过多种方式自定义 Google 地图平台 (GMP) 地图。大多数方法都需要您使用地图 ID 来访问多种不同的地图自定义功能。您还可以使用 JSON 样式设置手动自定义 GMP 地图,
使用地图 ID 自定义地图
地图 ID 是表示单个 Google 地图实例的唯一标识符。地图 ID 仅限单个平台(JavaScript、Android、iOS 或静态地图)使用。您可以将地图 ID 与项目相关联,并使用地图 ID 在网站和应用中启用功能或管理地图/设置地图样式。如需了解详情,请参阅地图 ID 概览。
使用地图 ID 和云端地图样式设置进行自定义
借助云端地图样式设置,您可以使用地图 ID 和地图样式为用户打造自定义的道路地图体验。然后,您可以在 Cloud 控制台中根据需要更新样式,而无需更新应用的代码。如需了解详情,请参阅云端地图样式设置。
使用 JSON 样式设置手动自定义地图
手动自定义地图可让您设置普通地图类型的样式,并且不需要地图 ID。对样式的任何更新都需要更新代码。您无法在同一应用中同时使用手动地图样式设置和云端地图样式设置。
如需使用 JSON 样式设置手动自定义地图,请参阅添加样式化地图。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-16。
[null,null,["最后更新时间 (UTC):2025-07-16。"],[[["Google Maps Platform (GMP) maps can be customized through various methods, primarily using a map ID."],["Map IDs are unique identifiers associated with a project and a specific platform (JavaScript, Android, iOS, or Static maps) to enable features and manage map styles."],["Cloud-based maps styling allows for the use of map IDs and map styles to customize road maps, with the benefit of updating styles in the Cloud console without code changes."],["Manual map customization using JSON styling is available for styling the normal map type but does not require a map ID and necessitates code updates for any style changes."],["Cloud-based maps styling and manual map styling using JSON cannot be combined within the same application."]]],["Google Maps Platform (GMP) maps can be customized using map IDs or JSON styling. Map IDs, unique identifiers for a single map instance on a specific platform (Android, iOS, JavaScript, or Web Service), enable cloud-based styling and feature management via the Cloud console. JSON styling, which doesn't require a map ID, allows manual map styling but necessitates code updates for any changes. Cloud-based and manual styling cannot be combined. Select a platform to begin, or check out map ID overview and cloud-based map styling.\n"]]