Omówienie definiowania stylów map w Google Cloud
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Dostosowuj i aktualizuj mapę drogową dla użytkowników bez konieczności modyfikowania kodu aplikacji. Dzięki stylizowaniu map w chmurze Google Maps Platform w konsoli Google Cloud możesz wybierać kolory i ustawiać widoczność elementów na domyślnym typie mapy roadmap
i stosować je we wszystkich aplikacjach JavaScript, iOS i Android.
Mapy Google udostępniają różne widoki, np. satelitarny, terenu i mapę drogową, ale stylizacja map oparta na chmurze wpływa tylko na domyślny roadmap
typ mapy.
Więcej informacji o innych sposobach dostosowywania mapy znajdziesz w artykule Dostosowywanie Map.
Dlaczego warto korzystać z definiowania stylów map w Google Cloud
Dzięki definiowaniu stylów map w Google Cloud możesz tworzyć bardziej angażujące i informacyjne mapy oraz aktualizować je bez wprowadzania zmian w kodzie:
- Więcej elementów mapy: dostosuj prawie 100 elementów mapy w 4 kategoriach. Ciekawe miejsca obejmują takie cechy jak Rozrywka, Rekreacja i Usługi, z których każda ma kilka cech podrzędnych. Na przykład: usługi obejmują bankomat, bank, stację paliw i toaletę. Pełną listę znajdziesz w artykule Elementy, które można stylizować na mapie.
- Więcej sposobów dostosowywania map: definiowanie stylów map w Google Cloud ułatwia i usprawnia stylizowanie mapy. Ostatnie aktualizacje zapewniają większą kontrolę nad wyglądem i działaniem mapy bazowej dzięki etykietom i geometriom, które wcześniej nie były dostępne w przypadku elementów mapy. Możesz na przykład dostosować etykiety stosowane do atrakcji turystycznych, restauracji, obszarów rekreacyjnych, służb ratunkowych, sklepów detalicznych i innych miejsc.
- Szybkie wczytywanie map po pierwszym użyciu: po początkowym czasie uruchamiania, gdy styl mapy zostanie pobrany i zapisany w pamięci podręcznej, kolejne wyświetlenia oraz przesuwanie i powiększanie mapy będą szybsze.
- Ulepszony interfejs edytora stylu mapy: ustawienia mapy umożliwiają definiowanie właściwości stylu mapy, takich jak style budynków i punktów orientacyjnych oraz poziomy gęstości ważnych miejsc. Elementy, które można stylizować, są wyświetlane na jednym panelu, co zapewnia większy widoczny obszar mapy podczas wprowadzania dostosowań.
Znalezienie funkcji mapy jest też łatwiejsze dzięki bardziej intuicyjnym kategoriom, które można rozwijać i zwijać, oraz polu filtra, które pozwala zawęzić listę do potrzebnej funkcji mapy.
Możliwości definiowania stylów map w Google Cloud
Dzięki definiowaniu stylów map w Google Cloud możesz:
- Użyj edytora stylu bez kodu: projektant może utworzyć styl i wyświetlić jego podgląd, aby dopasować go do Twoich celów i marki bez konieczności kodowania.
- Zmieniaj style bez wprowadzania zmian w kodzie: twórz i testuj zmiany stylu mapy bez wprowadzania zmian w kodzie po umieszczeniu identyfikatora mapy.
- Zmienianie stylu dodatkowych elementów mapy: zmień widoczność i kolor dodatkowych elementów mapy, takich jak drogi, budynki, zbiorniki wodne, ciekawe miejsca i trasy transportu publicznego.
Jak działa definiowanie stylów map w Google Cloud
Style map są przechowywane i edytowane w konsoli Google Maps Platform w Google Cloud. Twoja aplikacja używa identyfikatora mapy, aby zażądać stylu mapy z konsoli Cloud, a następnie zastosować go w aplikacji. Z tym samym stylem mapy możesz powiązać kilka identyfikatorów map, dzięki czemu mapy na różnych platformach aplikacji będą wyglądać tak samo.
Jak korzystać z definiowania stylów map w Google Cloud
1 |
Rozpocznij |
Przejdź do sekcji Rozpocznij i skonfiguruj, a następnie zapoznaj się z samouczkiem. |
2 |
Tworzenie stylu mapy w Google Cloud |
Przeczytaj artykuł Tworzenie i używanie stylów mapy. |
3 |
Powiązywanie stylu mapy z identyfikatorem mapy |
Utwórz lub otwórz identyfikator mapy dla swojego typu aplikacji i przypisz do niego styl mapy.
Możesz utworzyć dodatkowe identyfikatory map dla aplikacji na innych platformach i przypisać do nich ten sam styl mapy. Więcej informacji znajdziesz w artykule Tworzenie powiązań identyfikatorów map ze stylem i usuwanie ich.
|
4 |
Dodawanie identyfikatora mapy do aplikacji |
Twoje mapy będą wtedy korzystać ze stylu mapy powiązanego z tym identyfikatorem. Szczegółowe informacje znajdziesz w artykule Dodawanie identyfikatora mapy do mapy. |
5 |
Dostosowywanie stylu mapy online |
Jeśli chcesz zmienić styl mapy, edytuj go w definiowaniu stylów w chmurze. Szczegółowe informacje znajdziesz w artykule Aktualizowanie stylu mapy. |
6 |
Publikowanie zmienionego stylu mapy |
Gdy zechcesz zaktualizować styl mapy, opublikuj go, a nowy styl mapy pojawi się w Twojej aplikacji. Więcej informacji znajdziesz w artykule Publikowanie stylu mapy. |
Co dalej?
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-12 UTC.
[null,null,["Ostatnia aktualizacja: 2025-08-12 UTC."],[[["\u003cp\u003eCloud-based maps styling allows you to customize the appearance of the default roadmap in your Google Maps Platform applications (Android, iOS, JavaScript, and Web Service) through the Google Cloud Console.\u003c/p\u003e\n"],["\u003cp\u003eYou can create and update map styles without needing to change your application code, making it easier to maintain a consistent brand experience across platforms.\u003c/p\u003e\n"],["\u003cp\u003eCloud-based maps styling offers a vast range of customization options for nearly 100 map features, providing granular control over colors, visibility, and labels for elements like roads, buildings, points of interest, and more.\u003c/p\u003e\n"],["\u003cp\u003eMap styles are associated with map IDs, enabling you to apply the same style across different applications and platforms by using the corresponding map ID.\u003c/p\u003e\n"],["\u003cp\u003eOnce a map style is downloaded and cached, subsequent map loads and interactions are faster, providing a smoother user experience.\u003c/p\u003e\n"]]],["Cloud-based map styling in Google Maps Platform allows customization of the default `roadmap` view for Android, iOS, and JavaScript applications. Key actions include creating map styles via a no-code editor, associating them with map IDs, and implementing these IDs into applications. This enables style changes without code updates. Users can customize nearly 100 features, including points of interest, labels, and geometries. The process involves getting started, creating styles, linking them to map IDs, and adding the ID to apps. Subsequent map views are quicker after the first load.\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/javascript/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/javascript/cloud-customization/setup), and then check out the [Tutorial](/maps/documentation/javascript/cloud-customization/tut). |\n| 2 | **Create a cloud-based map style** | See [Create and use map styles](/maps/documentation/javascript/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/javascript/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/javascript/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/javascript/cloud-customization/map-styles#publish-style). |\n\nWhat's next\n\n- Try out the [Tutorial](/maps/documentation/javascript/cloud-customization/tut).\n- Check out cloud styling application requirements. See [Application requirements](/maps/documentation/javascript/cloud-customization/setup#reqs)."]]