मैप स्टाइल को पसंद के मुताबिक बनाने पर, यह समझने में मदद मिलती है कि अलग-अलग मैप फ़ीचर की स्टाइल बदलने से, मैप की अन्य स्टाइल पर क्या असर पड़ सकता है. कई लेयर एक-दूसरे पर ओवरलैप हो रही हैं:
बेसिक मैप: मैप की स्टाइल बनाना शुरू करने पर, आपको सबसे पहले बेसिक मैप की स्टाइल दिखती है. यह डिफ़ॉल्ट मैप होता है. मैप के जिन फ़ीचर को आपने पसंद के मुताबिक नहीं बनाया है उनमें बुनियादी मैप की स्टाइलिंग बनी रहती है.
मैप की स्टाइल: कस्टम स्टाइल, बुनियादी मैप लेयर की स्टाइल को बदल देती हैं.
इस इमेज में, कस्टम मैप स्टाइल में शहरी इलाकों को हल्के नीले रंग और सड़कों को गहरे नीले रंग में दिखाया गया है.
स्टाइल एलिमेंट: मैप के हर फ़ीचर में एक या उससे ज़्यादा स्टाइल एलिमेंट होते हैं. इन्हें अपनी पसंद के मुताबिक बनाया जा सकता है. इस इमेज में, शहरी इलाकों के मैप फ़ीचर पॉलीगॉन के फ़िल कलर को ऐक्वा के तौर पर स्टाइल किया गया है. साथ ही, सड़क नेटवर्क के फ़िल कलर को नीले रंग के तौर पर स्टाइल किया गया है.
मैप की सुविधाओं का क्रम
मैप स्टाइल में, मैप की सुविधाओं को क्रम से व्यवस्थित किया जाता है. सबसे ऊपर, मैप की चार मुख्य सुविधाएं होती हैं. इसके बाद, मैप की अन्य सभी सुविधाओं को क्रम से व्यवस्थित किया जाता है. डिफ़ॉल्ट रूप से, मैप की कोई सुविधा, क्रम में उससे ऊपर मौजूद मैप की सुविधा (उसकी पैरंट सुविधा) के लिए, एलिमेंट की स्टाइल इनहेरिट करती है. हालांकि, टॉप लेवल की स्टाइल को बदला जा सकता है. इसके लिए, क्रम में उससे नीचे मौजूद मैप की सुविधाओं (चाइल्ड मैप की सुविधाएं) के लिए, स्टाइल के एक या उससे ज़्यादा एलिमेंट सेट करें. मैप की सुविधाओं के क्रम के बारे में जानने के लिए, मैप पर स्टाइल की जा सकने वाली चीज़ें लेख पढ़ें.
हर मैप फ़ीचर में एक या उससे ज़्यादा एलिमेंट या मैप फ़ीचर के हिस्से होते हैं. इन्हें स्टाइल किया जा सकता है. उदाहरण के लिए, पॉलीगॉन (मैप फ़ीचर का आकार) के लिए रंग भरने का विकल्प एक एलिमेंट है. साथ ही, टेक्स्ट लेबल के लिए स्ट्रोक का रंग भी एक एलिमेंट है. हर एलिमेंट को अलग-अलग स्टाइल किया जाता है. साथ ही, जिस एलिमेंट को स्टाइल नहीं किया जाता है वह डिफ़ॉल्ट स्टाइल में दिखता है. एलिमेंट अलग-अलग होने की वजह से, लेबल के टेक्स्ट के लिए फ़िल कलर सेट किया जा सकता है. साथ ही, स्ट्रोक (आउटलाइन) के कलर को डिफ़ॉल्ट पर सेट किया जा सकता है. इसके अलावा, इसे पैरंट स्टाइल से इनहेरिट किया जा सकता है.
स्टाइल हैरारकी और इनहेरिटेंस के काम करने के तरीके को समझने के लिए, यहां कुछ दिशा-निर्देश दिए गए हैं.
डिफ़ॉल्ट तौर पर, चाइल्ड स्टाइल पैरंट स्टाइल से मिलती-जुलती होती हैं: अगर आपको मैप की सभी चाइल्ड सुविधाओं के लिए एक ही स्टाइल सेट करनी है, तो पैरंट मैप की सुविधा के लिए स्टाइल सेट करें. इसके बाद, चाइल्ड स्टाइल को डिफ़ॉल्ट के तौर पर छोड़ दें.
कस्टम चाइल्ड स्टाइल, पैरंट स्टाइल को ओवरराइड करती हैं: पैरंट स्टाइल को ओवरराइड करने के लिए,
चाइल्ड स्टाइल पर कस्टम स्टाइल सेट करें.
स्टाइल एलिमेंट एक-दूसरे से अलग होते हैं: मैप की किसी सुविधा (उदाहरण के लिए, पॉलीगॉन, लेबल आइकॉन, और लेबल टेक्स्ट फ़िल और स्ट्रोक) के लिए सेट किए जा सकने वाले स्टाइल एलिमेंट एक-दूसरे से अलग होते हैं. अगर आपने पॉलीगॉन का रंग सेट किया है, लेकिन आइकॉन को नहीं बदला है, तो पॉलीगॉन की स्टाइल, पैरंट स्टाइल को बदल देगी. हालांकि, आइकॉन में पैरंट या डिफ़ॉल्ट स्टाइल लागू रहेगी.
मैप की सुविधाएं छिपाने के लिए, 'दिखने की सुविधा' बंद करें: अगर आपको मैप पर सिर्फ़ एक चीज़ देखनी है, तो आपको बाकी सभी चीज़ों के लिए, दिखने की सुविधा बंद करनी होगी.
क्रम और इनहेरिटेंस का उदाहरण
यहां इनहेरिटेंस और क्रम के काम करने का एक उदाहरण दिया गया है.
नेचुरल की टॉप-लेवल मैप सुविधा चुनें. इसके बाद, पॉलीगॉन में रंग भरने के लिए पीले रंग को सेट करें. यह कोड, नेचुरल के तहत मैप फ़ीचर के सभी पॉलीगॉन को पीले रंग में स्टाइल करता है:
आपको लैंड कवर को भी पीला करना है. यह नेचुरल के तहत आता है. इसलिए, इसे बिना स्टाइल के छोड़ दें. इससे यह नेचुरल की स्टाइल को इनहेरिट कर लेगा.
आपको जंगलों को हरे रंग में दिखाना है. इसलिए, भूमि का प्रकार में जाकर, जंगल खोलें और उसके पॉलीगॉन को हरे रंग में रंग दें. यह कस्टम चाइल्ड स्टाइल, लैंड कवर और नेचुरल के लिए स्टाइल को बदल देती है.
आपको बर्फ़ को हल्के नीले रंग में दिखाना है. इसलिए, भूमि का प्रकार में जाकर, बर्फ़ खोलें और उसके पॉलीगॉन को हल्के नीले रंग में रंगें.
आखिर में, आपको पानी को ऐक्वा रंग में दिखाना है. इसलिए, नैचुरल>पानी चुनें और उसके पॉलीगॉन को ऐक्वा रंग में रंग दें. चाइल्ड स्टाइल Water सेट करने पर, पैरंट स्टाइल Natural ओवरराइड हो जाती है.
अपनी ज़रूरतों के हिसाब से मैप की सुविधाओं को हाइलाइट करने के लिए, इसी तरह की प्रोसेस अपनाएं.
[null,null,["आखिरी बार 2025-08-31 (UTC) को अपडेट किया गया."],[],[],null,["Select platform: [Android](/maps/documentation/android-sdk/cloud-customization/map-hier \"View this page for the Android platform docs.\") [iOS](/maps/documentation/ios-sdk/cloud-customization/map-hier \"View this page for the iOS platform docs.\") [JavaScript](/maps/documentation/javascript/cloud-customization/map-hier \"View this page for the JavaScript platform docs.\") [Web Service](/maps/documentation/maps-static/cloud-customization/map-hier \"View this page for the Web Service platform docs.\")\n\n\u003cbr /\u003e\n\nWhen you customize a map style, it helps to understand how styling different map\nfeatures may affect other styles on the map. There are several layers that\noverlap:\n\n- **The base map**: When you start creating a map style, the initial\n you see is the style of the base map; that is, the default map. Any map\n features you don't customize retain the base map styling.\n\n- **Map styles**: Custom styles override the styles on the base map layer.\n In this image, the custom map style overrides the urban areas as aqua\n and roads as dark blue.\n\n- **Style elements**: Each map feature has one or more style elements that\n you can customize. In this image, the urban areas map feature polygon\n fill color is styled as aqua, and the road network fill color\n is styled as blue.\n\nMap feature hierarchy\n\nWithin a map style, map features are organized hierarchically, with 4 broad\nmap features at the top, and all other map features arranged beneath them in\na logical hierarchy. By default, a map feature inherits the element styles\nfor the map feature above it in the hierarchy (its parent); however, you\ncan override the top level style by setting one or more of the style elements\nfor map features underneath it (child map features). For details on the map\nfeature hierarchy, see [What you can style on a map](/maps/documentation/maps-static/cloud-customization/taxonomy).\n\nEach map feature has one or more elements, or parts of the map feature, that\nyou can style. For example, the fill color for the polygon (the map feature\nshape) is an element, as is the stroke color for the text label. You style\neach element separately, and any element you don't style retains the default\nstyle. Since elements are separate, you can style the fill color for label\ntext, and leave the stroke (outline) color as the default (or inheriting\nfrom a parent style).\n\nHere are some helpful guidelines in understanding how style hierarchy and\ninheritance work.\n\n- **Default child styles inherit from the parent**: To have all\n child map features inherit a style, set the style for the parent map feature,\n and leave the child style as the default.\n\n- **Custom child styles override the parent**: To override the parent style,\n set a custom style on the child feature.\n\n- **Style elements are independent**: The style elements you can set for a\n map feature (for example, the polygon, the label icon, and the label text\n fill and stroke) are independent from each other. If you set the polygon\n color, but leave the icon alone, the polygon style overrides the parent\n style, but the icon inherits the parent or default style.\n\n- **Turn off Visibility to hide map features**: If you want to see only one\n thing on your map, you have to turn off visibility for everything else.\n\n | **Note:** When you hide map features or make them semi-transparent, you may expose boundary inaccuracies. Map feature boundaries are not always precise, but are adjusted to look correct when all layers are visible. For more details, see [Manage styles that overlap](/maps/documentation/maps-static/cloud-customization/overlap).\n\nHierarchy and Inheritance Example\n\nHere is an example of how inheritance and hierarchy works.\n\n1. Select the top-level map feature of **Natural** , and set the\n **Polygon Fill color** to yellow. This styles all polygons for map\n features under **Natural** to be yellow:\n\n2. You want **Land cover** , which is under **Natural** , to also be yellow,\n so you leave it unstyled, and it inherits the style from **Natural**.\n\n3. You want forests to be green, so under **Land cover** , you open **Forest** ,\n and color its polygon green. This custom child style overrides the\n styles for **Land cover** and **Natural**.\n\n4. You want ice to be shown a pale aqua, so also under **Land cover** , you\n open **Ice**, and color its polygon pale aqua.\n\n5. And last, you want water to be aqua, so you select **Natural\\\u003eWater** , and\n color its polygon aqua. Setting the child style **Water** overrides the parent\n style for **Natural**.\n\nFollow a similar process to highlight the map features for your needs."]]