管理重疊的樣式
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
在某些縮放等級下,基本地圖的部分地圖項目會彼此重疊。要是發生重疊,另一個地圖項目樣式會完全或部分遮蔽您設定的樣式,您可能就無法看到自訂樣式。如果重疊的地圖項目呈現部分透明,顏色就會改變。
如果您為地圖項目設定樣式,但看不到所做的變更,可能是因為有地圖項目重疊。例子如下:
地圖項目完全重疊:歸類在「Points of interest」(搜尋點) 下層的「Nature Reserve」(自然保護區) 地圖項目,可能會與「Natural」(自然) 下層的「Vegetation」(植被) 地圖項目重疊。舉例來說,如果您為國家公園設定樣式,就不會看到黃石國家公園顯示「Nature Reserve」(自然保護區) 樣式,因為「Vegetation」(植被) 地圖項目蓋住了「Nature Reserve」(自然保護區) 樣式。

另一個例子是部分室內停車場會發生「Parking」(停車場) 和「Building」(建築物) 兩種地圖項目重疊的情況。
透明地圖項目與其他地圖項目重疊:如果某個透明地圖項目與其他地圖項目重疊,在某些縮放等級下就會以疊加形式顯示。舉例來說,這兩張圖片顯示醫院的樣式設為紅色。在第一張圖片中,「Building」(建築物) 地圖項目樣式與「Hospital」(醫院) 地圖項目重疊,但是以半透明的方式顯示,因此顏色會改變。在第二張圖片中,「Building」(建築物) 地圖項目的「Visibility」(顯示設定) 為「Off」(關閉),因此會顯示選定的樣式,也就是純紅色。

找出重疊的地圖項目
如要瞭解哪些重疊的地圖項目會影響顯示結果,請按照下列步驟操作:
如果您大概知道是哪個地圖項目重疊,請找出有可能重疊的地圖項目,然後將「Visibility」(顯示設定) 設為「Off」(關閉),看看樣式能否正常顯示。
嘗試關閉最有可能重疊的地圖項目,例如「Building」(建築物) 或「Natural」(自然)。
如果還是找不到,請先依序將其他頂層地圖項目的「Visibility」(顯示設定) 設為「Off」(關閉),然後觀看地圖上的樣式是否正常顯示。
將範圍縮小到某個頂層地圖項目後,請測試下層的地圖項目來找出重疊項目。
管理重疊的地圖項目
瞭解哪些地圖項目重疊後,您有幾項選擇:
將重疊地圖項目的顯示設定設為關閉:這樣就能從地圖移除該地圖項目。
一併為重疊的地圖項目設定樣式:除了欲使用的地圖項目外,您也可以為重疊的地圖項目設定樣式,使其樣式與您要變更或加入的地圖項目更相容。
改為重疊的地圖項目設定樣式:如果對您來說可行,您可以為重疊的地圖項目設定樣式,而不是設定原始地圖項目的樣式。
維持重疊狀態:如上方醫院一例所示,有時也可以保留重疊效果,不要關閉所有建築物的顯示設定。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-27 (世界標準時間)。
[null,null,["上次更新時間:2025-08-27 (世界標準時間)。"],[],[],null,["Select platform: [Android](/maps/documentation/android-sdk/cloud-customization/overlap \"View this page for the Android platform docs.\") [iOS](/maps/documentation/ios-sdk/cloud-customization/overlap \"View this page for the iOS platform docs.\") [JavaScript](/maps/documentation/javascript/cloud-customization/overlap \"View this page for the JavaScript platform docs.\") [Web Service](/maps/documentation/maps-static/cloud-customization/overlap \"View this page for the Web Service platform docs.\")\n\n\u003cbr /\u003e\n\nOn the base map, some map features overlap each other at certain\nzoom levels. When overlapping happens, you might not see a custom style appear\nbecause another map feature style completely or partially obscures the style\nyou set. If the overlapping map feature is partially transparent, it changes\nthe color.\n\nIf you are styling a map feature, and aren't seeing your changes appear,\nit may be because there is an overlapping map feature. Here are some examples:\n\n- **Map features completely overlap** : The map feature **POI\\\u003eNature Reserve**\n may overlap with a **Natural\\\u003eVegetation** map feature. For example, if you\n are styling national parks, Yellowstone never shows the **Nature Reserve**\n style because the **Vegetation** map feature covers it.\n\n Another example is some parking garages have map features of parking\n and building overlapping.\n- **A transparent map feature overlaps another** : If a transparent map feature\n overlaps another map features, it appears as an overlay\n at some zoom levels. For example, these two images show hospitals\n styled as red. In the first, the **Building** map feature style overlays the\n **Hospital** map feature, but is semi-transparent, so it alters the color.\n In the second image, the building map feature **Visibility** is **Off**,\n so it shows the chosen style--a solid red.\n\n\nFind map features that overlap\n\nTo figure out which overlapping map features affect your results,\ntake the following steps:\n\n1. If you have an idea what the overlapping map feature is, turn\n the **Visibility Off** for your suspected overlapping map feature, and\n see if your style appears as expected.\n\n2. Try turning off the most likely suspects, like **Building** or **Natural**.\n\n3. If you still haven't found it, start by turning **Visibility Off** on\n the other top-level map features in turn, watching the map for when\n your styling appears as expected.\n\n4. When you've narrowed it down to a top-level feature, test the map\n features under it to pinpoint the overlapping feature or features.\n\nManage overlapping map features\n\nOnce you figure out which map features are overlapping, you have a few choices:\n\n- **Turn visibility off on the overlapping map feature**: This change\n removes the map feature from the map.\n\n- **Style the overlapping feature as well**: By styling the overlapping\n map feature, you change a feature other than the one you intended so that\n its styling is more compatible with the style you want to change or add.\n\n- **Style the overlapping feature instead**: If it works for your needs,\n style the overlapping feature instead of the original map feature.\n\n- **Leave it overlapping**: As in the hospital example above, sometimes it\n works to leave the overlay effect, rather than turn off visibility for\n all buildings."]]