已淘汰:舊版雲端樣式已停用,並預計於 2025 年 3 月 18 日當天或之後淘汰。屆時,舊版地圖樣式會自動更新。Google 建議您在 2025 年 3 月前改用新版雲端式地圖樣式設定。詳情請參閱「
淘汰項目」一文。如要更新舊版樣式,請參閱「
將地圖樣式更新為最新版本」。
舊版雲端樣式設定範例
地圖 ID 是唯一識別碼,代表儲存在 Google Cloud 中的 Google 地圖樣式和設定。您可以使用地圖 ID 在網站和應用程式中啟用功能,或管理/設定地圖樣式。您可以在 Google Cloud 控制台專案的「Map Management」(地圖管理) 頁面中,為所需的每個平台建立地圖 ID (JavaScript、Android、iOS 或靜態地圖)。
如果您在使用雲端式地圖樣式時,採用的是採用 style
參數自訂的現有地圖,請務必移除這些參數,以免與日後推出的功能發生衝突。
如要在使用其中一個 Google 網路 API 的新地圖或現有地圖中新增地圖 ID,請附加 map_id
網址參數,並將其設為地圖 ID。本範例說明如何使用 Maps Static API 在地圖中加入地圖 ID。
<img src="https://maps.googleapis.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=13&size=600x300&maptype=roadmap&markers=color:blue%7Clabel:S%7C40.702147,-74.015794&markers=color:green%7Clabel:G%7C40.711614,-74.012318&markers=color:red%7Clabel:C%7C40.718217,-73.998284&key=YOUR_API_KEY&map_id=YOUR_MAP_ID&signature=YOUR_SIGNATURE" />

除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-01-14 (世界標準時間)。
[null,null,["上次更新時間:2025-01-14 (世界標準時間)。"],[[["A map ID is a unique identifier for a Google Map instance, used for features, management, and styling across platforms like JavaScript, Android, iOS, or Static maps."],["Map IDs are created within your Google Cloud console project on the Map Management page."],["To avoid conflicts, remove any existing cloud-based map styling using the `style` parameter before implementing a map ID."],["Integrate a map ID by adding the `map_id` URL parameter to your map's URL, setting its value to your specific map ID."]]],[]]