Zarządzanie stylami, które się nakładają
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Na mapie podstawowej niektóre elementy mapy nakładają się na siebie przy określonych poziomach powiększenia. Gdy występuje nakładanie, niestandardowy styl może się nie wyświetlać, ponieważ inny styl elementu mapy całkowicie lub częściowo zasłania ustawiony przez Ciebie styl. Jeśli nakładająca się funkcja mapy jest częściowo przezroczysta, zmienia kolor.
Jeśli stylizujesz element mapy, a zmiany nie są widoczne, może to być spowodowane nakładaniem się elementów mapy. Oto przykłady:
Funkcje mapy całkowicie się pokrywają: funkcja mapy POI>Nature Reserve może pokrywać się z funkcją mapy Natural>Vegetation. Jeśli na przykład zmieniasz styl parków narodowych, Yellowstone nigdy nie będzie wyświetlać stylu Rezerwat przyrody, ponieważ obejmuje go element mapy Roślinność.

Innym przykładem są niektóre parkingi wielopoziomowe, na których mapach parkingi i budynki się pokrywają.
Przezroczysty element mapy nakłada się na inny: jeśli przezroczysty element mapy nakłada się na inny element mapy, przy niektórych poziomach powiększenia będzie widoczny jako nakładka. Na przykład te 2 obrazy przedstawiają szpitale
w kolorze czerwonym. W pierwszym przypadku styl elementu mapy Budynek nakłada się na element Szpital, ale jest półprzezroczysty, więc zmienia kolor.
Na drugim obrazie funkcja mapy budynku Widoczność jest wyłączona, więc wyświetla wybrany styl – jednolity czerwony kolor.

Znajdowanie nakładających się elementów mapy
Aby dowiedzieć się, które nakładające się elementy mapy wpływają na Twoje wyniki, wykonaj te czynności:
Jeśli masz pomysł, który element mapy się nakłada, wyłącz widoczność podejrzewanego elementu mapy i sprawdź, czy styl wyświetla się zgodnie z oczekiwaniami.
Spróbuj wyłączyć najbardziej prawdopodobne kategorie, takie jak Budynki lub Przyroda.
Jeśli nadal nie możesz go znaleźć, zacznij od wyłączenia widoczności innych funkcji mapy najwyższego poziomu, obserwując mapę, aby sprawdzić, kiedy stylizacja pojawi się zgodnie z oczekiwaniami.
Gdy zawęzisz wybór do funkcji najwyższego poziomu, przetestuj funkcje mapy, aby określić nakładającą się funkcję lub funkcje.
Zarządzanie nakładającymi się elementami mapy
Gdy ustalisz, które funkcje mapy się nakładają, masz kilka możliwości:
Wyłącz widoczność nakładającego się elementu mapy: ta zmiana spowoduje usunięcie elementu mapy z mapy.
Zmień też styl nakładającego się elementu: zmiana stylu nakładającego się elementu mapy powoduje zmianę elementu innego niż zamierzony, tak aby jego styl był bardziej zgodny ze stylem, który chcesz zmienić lub dodać.
Zastosuj styl do nakładającej się funkcji: jeśli to rozwiązanie Ci odpowiada, zastosuj styl do nakładającej się funkcji zamiast do pierwotnej funkcji mapy.
Pozostaw nakładkę: jak w przykładzie szpitala powyżej, czasami lepiej jest pozostawić efekt nakładki, zamiast wyłączać widoczność wszystkich budynków.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-08-31 UTC.
[null,null,["Ostatnia aktualizacja: 2025-08-31 UTC."],[],[],null,["# Manage styles that overlap\n\nSelect 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\n| To use cloud-based maps styling on Android, you must use the latest renderer for Maps SDK for Android. [Follow these instructions](/maps/documentation/android-sdk/renderer).\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------------------------------\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-------------------------------\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."]]