A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/maps/documentation/ios-sdk/cloud-customization/map-hier-leg below:

Understand map style inheritance and hierarchy | Maps SDK for iOS

Skip to main content Understand map style inheritance and hierarchy

Stay organized with collections Save and categorize content based on your preferences.

When you customize a map style, it helps to understand how styling different map features may affect other styles on the map. There are several layers that overlap:

Map feature hierarchy

Within a map style, map features are organized hierarchically, with 4 broad map features at the top, and all other map features arranged beneath them in a logical hierarchy. By default, a map feature inherits the element styles for the map feature above it in the hierarchy (its parent); however, you can override the top level style by setting one or more of the style elements for map features underneath it (child map features). For details on the map feature hierarchy, see What you can style on a map.

Each map feature has one or more elements, or parts of the map feature, that you can style. For example, the fill color for the polygon (the map feature shape) is an element, as is the stroke color for the text label. You style each element separately, and any element you don't style retains the default style. Since elements are separate, you can style the fill color for label text, and leave the stroke (outline) color as the default (or inheriting from a parent style).

Here are some helpful guidelines in understanding how style hierarchy and inheritance work.

Hierarchy and Inheritance Example

Here is an example of how inheritance and hierarchy works.

  1. Select the top-level map feature of Natural, and set the Polygon Fill color to yellow. This styles all polygons for map features under Natural to be yellow:

  2. You want Land cover, which is under Natural, to also be yellow, so you leave it unstyled, and it inherits the style from Natural.

  3. You want forests to be green, so under Land cover, you open Forest, and color its polygon green. This custom child style overrides the styles for Land cover and Natural.

  4. You want ice to be shown a pale aqua, so also under Land cover, you open Ice, and color its polygon pale aqua.

  5. And last, you want water to be aqua, so you select Natural>Water, and color its polygon aqua. Setting the child style Water overrides the parent style for Natural.

Follow a similar process to highlight the map features for your needs.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-14 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[[["When customizing a map style, understand that base map styles are overridden by custom styles, which in turn can be overridden by styles applied to specific child map features."],["Map features are organized in a hierarchy, where child features inherit styles from their parent features unless explicitly overridden."],["Each map feature has independent style elements (e.g., fill color, stroke color) that can be customized individually."],["To hide map features, turn off their visibility."],["Customizing a map style involves strategically setting styles at different levels of the hierarchy, understanding inheritance, and adjusting individual style elements for desired visual effects."]]],["Map customization involves understanding how styling affects different map layers. The base map is the default, and custom styles override it. Map features are hierarchical; parent features' styles cascade to children, but children's custom styles override parents. Elements (like polygon fill or label text) within features are styled independently. Visibility can be toggled to show only specific map features. Styling a parent feature affects all child features by default unless they are custom styled.\n"]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4