云端地图样式设置概览
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
您可以为用户自定义和更新路线图体验,而无需更新应用的代码。借助 Google Cloud 控制台中的 Google Maps Platform 云端地图样式设置,您可以为默认 roadmap
地图类型的地图项选择颜色并设置其可见性,然后将其应用于所有 JavaScript、iOS 和 Android 应用。
虽然 Google 地图提供了不同的视图,例如卫星地图、地形图和路线图,但云端地图样式设置只会影响默认的 roadmap
地图类型。
如需了解自定义地图的其他方法,请参阅自定义地图。
为何使用云端地图样式设置
借助云端地图样式设置,您可以创建更具吸引力、信息更为丰富的地图,并可以在不更改代码的情况下进行更新:
- 更多地图项:四大类近 100 个单独的地图项可供您自行定义。地图注点包括娱乐、休闲和服务等地图项,每个类别都有若干子地图项。例如,“服务”类别包含 ATM 机、银行、加油站和洗手间等子地图项。如需查看完整列表,请参阅您可以在地图上设置哪些元素的样式。
- 更多自定义地图的方法:借助云端地图样式设置,您可以更轻松、更直观地设置地图样式。近期的更新提供更精细的控制选项,您可以使用旧版中未提供的地图项标签和几何图形,调整基本地图的外观和风格。例如,您可以自定义用于旅游景点、餐馆、休闲区、应急服务、零售店等地图项的标签。
- 首次使用后地图加载速度更快:地图初始启动时会下载和缓存相关样式,此后查看、平移或缩放地图时,加载速度会变快。
- 经改进的地图样式编辑器界面:通过地图设置,您可以定义地图样式的属性,如建筑物和地标的样式以及地图注点的密度级别。所有可设置样式的元素都集中显示在一个面板中,因此您在进行自定义时,可以看到更大的地图区域。此外,类别可以展开和收起,使用起来更加直观,您还可以使用过滤条件框限定查找范围,更轻松地找到所需地图项。
您可以使用云端地图样式设置执行的操作
您可以使用云端地图样式设置执行以下操作:
- 使用无需代码的样式编辑器:设计师无需编码即可创建并预览样式,使其与您的目标和品牌相符。
- 无需更改代码即可更改样式:添加地图 ID 后,可以在不更改代码的情况下,草拟和测试地图样式更改。
- 为更多地图项设置样式:更改更多地图项的可见性和颜色,如道路、建筑物、水体、地图注点和交通路线。
云端地图样式设置的工作原理
地图样式存储在 Google Maps Platform Cloud 控制台中,并可在其中进行修改。应用使用地图 ID 向 Cloud 控制台请求地图样式,然后将其应用于自身。您可以将多个地图 ID 与同一地图样式相关联,这样地图的外观就可以在各应用平台上保持一致。
如何使用云端地图样式设置
1 |
开始 |
参阅开始并设置,然后查看教程。 |
2 |
创建云端地图样式 |
参阅创建和使用地图样式。 |
3 |
将地图样式与地图 ID 相关联 |
为您的应用类型创建或打开地图 ID,并为此 ID 指定地图样式。
您可以为其他平台上的应用创建更多地图 ID,并为这些 ID 指定相同的地图样式。如需了解详情,请参阅为样式关联或移除地图 ID。 |
4 |
为您的应用添加地图 ID |
然后,您的地图将使用与该地图 ID 相关联的地图样式。如需了解详情,请参阅为您的应用添加地图 ID。 |
5 |
在线调整地图样式 |
如需更改地图样式,请一律在云端样式设置中进行修改。如需了解详情,请参阅更新地图样式。 |
6 |
发布更改后的地图样式 |
如果已准备好更新地图样式,请发布该样式,新的地图样式即会显示在您的应用中。如需了解详情,请参阅发布地图样式。 |
后续步骤
- 尝试按照教程进行操作。
- 若要查看云端样式设置的应用要求,请参阅应用要求。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eCloud-based maps styling allows you to customize the appearance of your Google Maps using a no-code editor, enabling you to create unique and on-brand map experiences.\u003c/p\u003e\n"],["\u003cp\u003eYou can update the style of your maps through the Google Cloud Console without requiring code changes to your application, simplifying the process of maintaining consistent map designs across platforms.\u003c/p\u003e\n"],["\u003cp\u003eCloud-based styling offers extensive customization options for nearly 100 map features, including points of interest, roads, buildings, and more, providing granular control over the visual elements of your maps.\u003c/p\u003e\n"],["\u003cp\u003eAfter the initial style download, subsequent map loads and interactions are faster due to caching, ensuring a smooth and responsive user experience.\u003c/p\u003e\n"]]],[],null,["Select platform: [Android](/maps/documentation/android-sdk/cloud-customization \"View this page for the Android platform docs.\") [iOS](/maps/documentation/ios-sdk/cloud-customization \"View this page for the iOS platform docs.\") [JavaScript](/maps/documentation/javascript/cloud-customization \"View this page for the JavaScript platform docs.\") [Web Service](/maps/documentation/maps-static/cloud-customization \"View this page for the Web Service platform docs.\")\n\n\u003cbr /\u003e\n\n| **Paid feature:**\n| Features accessed by adding a [map ID](/maps/documentation/get-map-id) triggers a map\n| load charged against the Dynamic Maps SKU for Android and iOS. See\n| [Google Maps Billing](/maps/billing-and-pricing/sku-details#dynamic-maps-ess-sku) for more information.\n\nCustomize and update the road map experience for your users without\nhaving to update your apps' code. With the Google Maps Platform cloud-based maps styling in the Google Cloud Console, you can select colors and set visibility for features on the default `roadmap` map type and apply it to all of your JavaScript, iOS, and Android applications.\n\nWhile Google Maps provides different views, such as satellite, terrain, and road map, cloud-based maps styling affects only the default `roadmap` map type.\n\nFor information on other ways to customize your map, see [Customize Maps](../map-ids/customize-maps-overview.md).\n\nWhy use cloud-based maps styling\n\nWith cloud-based maps styling, you can create more engaging and informative maps\nand update them without code changes:\n\n- **More map features** : Customize almost 100 individual map features, in four categories. Points of interest includes features such as Entertainment, Recreation, and Services, which each also have several child features. For example, Services includes ATM, Bank, Gas station, and Restroom. For the full list, see [What you can style on a map](/maps/documentation/maps-static/cloud-customization/taxonomy).\n- **More ways to customize maps**: Cloud-based maps styling makes it easier and more intuitive for you to style your map. Recent updates give you more granular control over the look and feel of the basemap with labels and geometries not previously available for map features. For example, you can customize labels applied to tourist attractions, restaurants, recreational areas, emergency services, retail, and more.\n- **Maps load quickly after the first use**: After the initial startup time as a map style is downloaded and cached, subsequent views and pan/zoom movement of the map are faster.\n- **Improved map style editor interface**: Map settings let you define map style properties, such as Building and landmark styles and POI density levels. Styleable elements are all shown on a single panel, giving you more visible map area when making customizations. It is also easier to find your map feature with more intuitive categories that expand and collapse, plus a filter box to scope the list to the map feature you need.\n\nWhat can you do with cloud-based maps styling\n\nYou can do the following with cloud-based maps styling:\n\n- **Use a no-code style editor**: A designer can create and preview a style to match your goals and branding without needing to code.\n- **Change styles without code changes**: Draft and test map style changes without any changes to your code once the map ID is in place.\n- **Style more map features**: Change the visibility and color of more map features, such as roads, buildings, bodies of water, points of interest, and transit routes.\n\nHow cloud-based maps styling works\n\nMap styles are stored and edited in the Google Maps Platform Cloud Console. Your\napplication uses a map ID to request a map style from the cloud console, and then\napplies it to your application. You can have several map IDs associated with the same map style,\nso your maps can look the same across your application platforms. \n\nHow to use cloud-based maps styling\n\n|---|--------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 1 | **Get started** | Head over to [Get started and set up](/maps/documentation/maps-static/cloud-customization/setup), and then check out the [Tutorial](/maps/documentation/maps-static/cloud-customization/tut). |\n| 2 | **Create a cloud-based map style** | See [Create and use map styles](/maps/documentation/maps-static/cloud-customization/map-styles). |\n| 3 | **Associate your map style with a map ID** | Create or open a map ID for your application type, and assign a map style to it. You can create additional map IDs for applications on other platforms and assign the same map style to them. For details, see [Associate or remove map IDs on your style](/maps/documentation/maps-static/cloud-customization/map-styles#associate-style-with-map-id). |\n| 4 | **Add the map ID to your application** | Your maps then use the map style associated with that map ID. For details, see [Add the map ID to your map](/maps/documentation/get-map-id#add-a-map-id-to-your-app). |\n| 5 | **Adjust your map style online** | Whenever you need to change your map style, edit it in cloud styling. For details, see [Update a map style](/maps/documentation/maps-static/cloud-customization/map-styles#update-style). |\n| 6 | **Publish your changed map style** | When you're ready to update a map style, publish it, and your new map style shows up in your application. For details, see [Publish a map style](/maps/documentation/maps-static/cloud-customization/map-styles#publish-style). |\n\nWhat's next\n\n- Try out the [Tutorial](/maps/documentation/maps-static/cloud-customization/tut).\n- Check out cloud styling application requirements. See [Application requirements](/maps/documentation/maps-static/cloud-customization/setup#reqs)."]]