इस दस्तावेज़ में, JSON का इस्तेमाल करके मैप की स्टाइल बनाने, उनमें बदलाव करने, और उन्हें एक्सपोर्ट करने का तरीका बताया गया है.
JSON का इस्तेमाल करके, मैप के किन एलिमेंट की स्टाइल बदली जा सकती है, इस बारे में जानने के लिए, क्लाउड पर मैप की स्टाइलिंग के लिए JSON रेफ़रंस देखें.
JSON फ़ॉर्मैट में मौजूद मैप स्टाइल इंपोर्ट करना
JSON का इस्तेमाल करके मैप की स्टाइल बनाने के लिए, यह तरीका अपनाएं:
Google Cloud Console में, मैप स्टाइल पर जाएं. इसके बाद, ज़रूरत पड़ने पर कोई प्रोजेक्ट चुनें.
मैप की स्टाइल में जाकर, स्टाइल बनाएं पर क्लिक करें.
डायलॉग बॉक्स में, JSON टैब चुनें.
JSON स्टाइल इंपोर्ट करने के दो तरीके हैं:
मान्य JSON स्टाइलिंग कोड को फ़ील्ड में चिपकाएं या
scienceJSON फ़ाइल अपलोड करें पर क्लिक करें और इस्तेमाल करने के लिए कोई लोकल JSON फ़ाइल चुनें. फ़ील्ड में JSON स्टाइलिंग कोड दिखता है.
देखें कि आपके JSON में कोई गड़बड़ी तो नहीं है.
अगर आपके JSON में गड़बड़ियां हैं, तो "आपके JSON में N गड़बड़ियां हैं" चेतावनी दिखती है. ज़्यादा जानने के लिए, चेतावनी को बड़ा किया जा सकता है.
अगर आपका JSON मान्य है, तो मैप की झलक में आपकी पसंद के मुताबिक बनाई गई स्टाइल दिखेगी. साथ ही, नीला पसंद के मुताबिक बनाएं बटन उपलब्ध होगा.
नई मैप स्टाइल बनाने के लिए, पसंद के मुताबिक बनाएं पर क्लिक करें.
मैप की नई स्टाइल में, मैप की सुविधाएं चुनें. इसके बाद, उनकी स्टाइल की समीक्षा करें या ज़रूरत के हिसाब से उनमें बदलाव करें. कस्टम स्टाइल वाली मैप सुविधाओं के बगल में, नीले रंग का बिंदु होता है.
सेव करें पर क्लिक करें.
मैप स्टाइल सेव करें और पब्लिश करें बॉक्स में, अपनी स्टाइल का नाम डालें. इसके बाद, चाहें, तो उसका ब्यौरा भी डालें. इसके बाद, सेव करें पर क्लिक करें.
स्टाइल अपने-आप पब्लिश हो जाती है. इसके बाद, आपको अपनी नई स्टाइल का मुख्य पेज दिखता है.
स्टाइल एडिटर में मौजूद JSON टैब का इस्तेमाल करके, मैप की स्टाइल में बदलाव किया जा सकता है.
JSON एडिटर में किए गए बदलाव, स्टाइल पैनल में दिखते हैं. इसके अलावा, अगर स्टाइल पैनल में बदलाव किए जाते हैं, तो उन बदलावों को JSON एडिटर में देखा जा सकता है. इन दोनों तरीकों से, मैप की झलक भी अपडेट होती है.
JSON का इस्तेमाल करके मैप की स्टाइल में बदलाव करने के लिए, यह तरीका अपनाएं:
Google Cloud Console में, मैप स्टाइल पर जाएं. इसके बाद, ज़रूरत पड़ने पर कोई प्रोजेक्ट चुनें.
मैप स्टाइल में जाकर, स्टाइल की सूची से कोई मौजूदा स्टाइल चुनें.
स्टाइल के मुख्य पेज पर, पसंद के मुताबिक बनाएं को चुनें.
JSON स्टाइल एडिटर खोलने के लिए, JSON टैब चुनें.
एडिटर में बदलाव करें. JSON फ़ाइल भी अपलोड की जा सकती है.
मैप की झलक को अपडेट करने के लिए, Commit पर क्लिक करें.
सभी बदलाव करने के बाद, सेव करें पर क्लिक करें. अगर कोई नई स्टाइल बनाई जा रही है, तो बदलाव अपने-आप लाइव हो जाते हैं. अगर किसी मौजूदा स्टाइल में बदलाव किए जा रहे हैं, तो बदलाव ड्राफ़्ट के तौर पर सेव हो जाते हैं. साथ ही, आपको पब्लिश करें पर क्लिक करना होगा, ताकि उस मैप स्टाइल का इस्तेमाल करने वाले किसी भी मैप आईडी के लिए, आपके बदलाव लाइव हो जाएं.
मैप की स्टाइल को JSON फ़ाइल के तौर पर एक्सपोर्ट करना
मैप की स्टाइल को JSON फ़ाइल के तौर पर एक्सपोर्ट करने के लिए, यह तरीका अपनाएं:
Google Cloud Console में, मैप स्टाइल पर जाएं. इसके बाद, ज़रूरत पड़ने पर कोई प्रोजेक्ट चुनें.
मैप स्टाइल में जाकर, स्टाइल की सूची से कोई मौजूदा स्टाइल चुनें.
स्टाइल के मुख्य पेज पर, पसंद के मुताबिक बनाएं को चुनें.
[null,null,["आखिरी बार 2025-08-27 (UTC) को अपडेट किया गया."],[],[],null,["Select platform: [Android](/maps/documentation/android-sdk/cloud-customization/json \"View this page for the Android platform docs.\") [iOS](/maps/documentation/ios-sdk/cloud-customization/json \"View this page for the iOS platform docs.\") [JavaScript](/maps/documentation/javascript/cloud-customization/json \"View this page for the JavaScript platform docs.\") [Web Service](/maps/documentation/maps-static/cloud-customization/json \"View this page for the Web Service platform docs.\")\n\n\u003cbr /\u003e\n\n| **Experimental:** Features marked with the science science icon are experimental.\n\nThis document explains how to use JSON to create, edit, and export map styles.\nFor information on what you can style using JSON, see the\n[JSON reference for cloud-based maps styling](/maps/documentation/javascript/cloud-customization/json-reference).\n\nImport a JSON map style\n\nTo create a map style using JSON, perform the following steps:\n\n1. In the Google Cloud console,\n go to [**Map styles**](https://console.cloud.google.com/google/maps-apis/studio/styles), and select a project, if needed.\n\n2. In **Map styles** , click **Create style**.\n\n3. In the dialog, select the **JSON** tab.\n\n4. There are two ways to import your JSON style:\n\n - Paste your valid JSON styling code into the field, or\n - scienceClick **Upload JSON File** and choose a local JSON file to use. The JSON styling code appears in the field.\n\n | **Note:** When importing legacy JSON, a warning appears and the style is converted to the latest JSON format. The conversion is approximate but sets you up for a richer and more customizable experience. To only use legacy JSON, see [Use embedded JSON style declarations](../json-styling-overview).\n5. Check whether your JSON has errors.\n\n - If your JSON has errors, the warning \"Your JSON contains N errors\" appears and you can expand the warning to learn more.\n - If your JSON is valid, the map preview shows your custom style and the blue **Customize** button is available.\n6. Click **Customize** to create a new map style.\n\n7. In your new map style, select map features and review or change their style\n as needed. Map features with custom styles have a solid blue dot next to\n them.\n\n | **Note:** Not all styles appear at all zoom levels.\n8. Click **Save**.\n\n9. In the **Save and publish map style** box, enter a name for your style and\n optionally a description, and click **Save**.\n\nThe style is automatically published, and you see your new style's\nmain page.\n\nTo add your map style to a map ID, see\n[Associate your style to a map ID](/maps/documentation/javascript/cloud-customization/map-styles#associate-style-with-map-id).\n\nEdit a map style with JSON **Experimental:** This feature is experimental.\n\nYou can edit map styles using the JSON tab in the style editor.\n\nChanges made in the JSON editor are reflected in the style panel. Additionally,\nif you make changes in the style panel, you can find those changes in the JSON\neditor. Both methods also update the map preview.\n\nTo edit a map style using JSON, see the following steps:\n\n1. In the Google Cloud console,\n go to [**Map styles**](https://console.cloud.google.com/google/maps-apis/studio/styles), and select a project, if needed.\n\n2. In **Map styles**, select an existing style from the style list.\n\n3. In the style's main page, select **Customize**.\n\n4. Select the **JSON** tab to open the JSON style editor.\n\n5. Make your changes in the editor. You can also upload a JSON file.\n\n6. Click **Commit** to update the map preview.\n\n7. Once you're done with all of your changes, click **Save** . If you're\n creating a new style, the changes go live automatically. If you're making\n changes to an existing style, the changes save as a draft and you must click\n **Publish** to have your changes go live for any map IDs using that map\n style.\n\nExport a map style as JSON **Experimental:** This feature is experimental.\n\nTo export a map style as a JSON file, see the following steps:\n\n1. In the Google Cloud console,\n go to [**Map styles**](https://console.cloud.google.com/google/maps-apis/studio/styles), and select a project, if needed.\n\n2. In **Map styles**, select an existing style from the style list.\n\n3. In the style's main page, select **Customize**.\n\n4. Select the **JSON** tab to open the JSON style editor.\n\n5. Select **Export**."]]