「雲端式地圖樣式設定」功能已推出適用網頁及行動裝置的新版地圖樣式。新版地圖樣式內建全新的預設調色盤、現代化的圖釘,並且提升地圖體驗、改善服務的可用性。詳情請參閱「
Google 地圖平台新版地圖樣式」一文。如要開始在雲端式地圖樣式設定中使用全新的地圖顏色,請參閱「
將地圖樣式更新為最新版本」。
樣式範例
以下提供幾個複雜的元素樣式設定範例。
有綠色外框的黃色道路
自訂所有道路的基本樣式,填滿淡黃色且外框為深綠色。
在「地圖項目」下方,選取「路網」。
在「路網」窗格的「折線」底下,選取「填滿顏色」下方的方塊。
選取淺黃色,例如 16 進位色碼 #eeeec8。
選取「筆劃顏色」下方的方塊,然後選取深綠色,例如 16 進位色碼 #155304。
在「筆劃寬度」下方,將寬度設為 3 像素。
在縮放畫面的過程中,不同道路出現及消失時都會顯示這個樣式。如果道路太小而無法顯示外框,會只呈現黃色。
不同縮放等級的水域顏色
某些類型的元素樣式可能只會在特定縮放等級顯示,例如 3D 建築物或搜尋點。新增以下樣式:地圖縮到最小 (z0) 時,水域為深藍色;放大到州或省 (筆電呈現縮放等級 6) 時,水域為中等藍色;放大到極限 (z19) 時,水域為淺藍色且有深藍色邊框。

選取「地圖項目」下方的「水域」。
在「水域」窗格的「多邊形」底下,選取「填滿顏色」下方的方塊,然後點選深藍色。
選取「填滿顏色」右側的縮放鑽石圖示,開啟縮放等級樣式設定窗格。
選取縮放等級 6,然後選取中等藍色。
選取縮放等級 19,然後將水域變更為淺藍色。
注意,如果您設定了筆劃顏色,則即使溪流、小河和許多較小的河川放到最大,也只會顯示主體顏色。大型池塘、湖泊及更大的水體才能顯示筆劃與填色的差異。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-02-28 (世界標準時間)。
[null,null,["上次更新時間:2025-02-28 (世界標準時間)。"],[[["This documentation provides guidance on customizing the visual style of map elements, such as roads and water bodies, using Cloud-based Map Styling."],["Users can learn to apply custom colors, outlines, and stroke widths to road networks based on zoom levels, creating unique map presentations."],["The examples demonstrate how to style water bodies with different colors based on zoom levels, showcasing the flexibility of map customization options."],["Users will understand how element styling, such as 3D buildings and POIs, might have visibility limitations based on zoom levels."],["This guide offers platform-specific instructions for implementing these customizations on Android, iOS, JavaScript, and Web Service platforms."]]],["The content details styling customizations for map elements across different platforms: Android, iOS, JavaScript, and Web Service. It provides examples of styling roads with a yellow fill and green outline by modifying the \"Road Network\" settings. Additionally, it illustrates how to adjust the color of water based on zoom levels, ranging from dark blue at maximum zoom out to pale blue with a dark blue border at maximum zoom in. The instructions are found within the \"Map Features\" and then within specific features, like the \"Road Network\" or \"Water\".\n"]]