Map.setControlVisibility
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
इससे मैप पर कंट्रोल दिखने की सेटिंग तय की जाती है.
यह ui.Map दिखाता है.
इस्तेमाल | रिटर्न |
---|
Map.setControlVisibility(all, layerList, zoomControl, scaleControl, mapTypeControl, fullscreenControl, drawingToolsControl) | ui.Map |
आर्ग्यूमेंट | टाइप | विवरण |
---|
all | बूलियन, ज़रूरी नहीं | क्या सभी कंट्रोल दिखाने हैं. गलत वैल्यू सेट करने पर, सभी कंट्रोल छिप जाते हैं. सही वैल्यू सेट करने पर, सभी कंट्रोल दिखते हैं. इन्हें अलग-अलग सेट किए गए पैरामीटर से बदला जा सकता है. ध्यान दें कि इस सेटिंग को साफ़ तौर पर सेट करने से, आने वाले समय में जोड़े जाने वाले किसी भी अतिरिक्त कंट्रोल पर असर पड़ेगा. |
layerList | बूलियन, ज़रूरी नहीं | इस विकल्प को 'गलत है' पर सेट करने पर, लेयर की सूची वाला पैनल छिप जाता है. वहीं, इसे 'सही है' पर सेट करने पर, लेयर की सूची वाले पैनल के दिखने की स्थिति इस बात पर निर्भर करती है कि सूची में लेयर मौजूद हैं या नहीं. डिफ़ॉल्ट रूप से, सूची दिखाने का विकल्प चुना जाता है. |
zoomControl | बूलियन, ज़रूरी नहीं | ज़ूम कंट्रोल दिखता है या नहीं. डिफ़ॉल्ट रूप से, यह वैल्यू 'सही' पर सेट होती है. |
scaleControl | बूलियन, ज़रूरी नहीं | यह कंट्रोल दिखाना है या नहीं, जो मैप के मौजूदा ज़ूम लेवल पर स्केल दिखाता है. डिफ़ॉल्ट रूप से, यह वैल्यू 'सही' पर सेट होती है. |
mapTypeControl | बूलियन, ज़रूरी नहीं | यह कंट्रोल दिखाना है या नहीं, जिसकी मदद से उपयोगकर्ता बुनियादी मैप बदल सकता है. डिफ़ॉल्ट रूप से, यह वैल्यू 'सही' पर सेट होती है. |
fullscreenControl | बूलियन, ज़रूरी नहीं | यह कंट्रोल दिखाना है या नहीं, जिसकी मदद से उपयोगकर्ता मैप को फ़ुल-स्क्रीन पर देख सकता है. डिफ़ॉल्ट रूप से, यह वैल्यू 'सही' पर सेट होती है. |
drawingToolsControl | बूलियन, ज़रूरी नहीं | यह कंट्रोल दिखाना है या नहीं, जिससे उपयोगकर्ता ज्यामिति बनाने वाले टूल जोड़ या उनमें बदलाव कर सके. डिफ़ॉल्ट रूप से, यह वैल्यू 'सही' पर सेट होती है. |
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003e\u003ccode\u003eMap.setControlVisibility()\u003c/code\u003e allows customization of the visibility of map controls, such as zoom, scale, layer list, map type, fullscreen, and drawing tools.\u003c/p\u003e\n"],["\u003cp\u003eControl visibility can be set individually for each control or globally using the \u003ccode\u003eall\u003c/code\u003e parameter, with individual settings overriding the global setting.\u003c/p\u003e\n"],["\u003cp\u003eBy default, all map controls are visible; setting \u003ccode\u003eall\u003c/code\u003e to \u003ccode\u003efalse\u003c/code\u003e will hide all controls, while setting it to \u003ccode\u003etrue\u003c/code\u003e will show all.\u003c/p\u003e\n"],["\u003cp\u003eThe layer list's visibility is influenced by the presence of layers and can be further customized using the \u003ccode\u003elayerList\u003c/code\u003e parameter.\u003c/p\u003e\n"]]],["The `Map.setControlVisibility` function sets the visibility of map controls. It accepts boolean arguments: `all`, `layerList`, `zoomControl`, `scaleControl`, `mapTypeControl`, `fullscreenControl`, and `drawingToolsControl`. `all` toggles all controls, while the others manage individual controls. Defaults for all controls except the layer list are set to show, the default for the layer list is to show if layers are present. The function returns the `ui.Map` object.\n"],null,["# Map.setControlVisibility\n\n\u003cbr /\u003e\n\nSets the visibility of the controls on the map.\n\n\u003cbr /\u003e\n\nReturns this ui.Map.\n\n| Usage | Returns |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|\n| `Map.setControlVisibility(`*all* `, `*layerList* `, `*zoomControl* `, `*scaleControl* `, `*mapTypeControl* `, `*fullscreenControl* `, `*drawingToolsControl*`)` | ui.Map |\n\n| Argument | Type | Details |\n|-----------------------|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `all` | Boolean, optional | Whether to show all controls. False hides all controls; true shows all controls. Overridden by individually set parameters. Note that setting this explicitly will affect any additional controls added in the future. |\n| `layerList` | Boolean, optional | When false, hides the layer list panel or, when true, allows the layer list panel's visibility to be determined by the presence of layers in the list. The default is to show the list. |\n| `zoomControl` | Boolean, optional | Whether the zoom control is visible. Defaults to true. |\n| `scaleControl` | Boolean, optional | Whether to show the control which indicates the scale at the map's current zoom level. Defaults to true. |\n| `mapTypeControl` | Boolean, optional | Whether to show the control that allows the user to change the base map. Defaults to true. |\n| `fullscreenControl` | Boolean, optional | Whether to show the control that allows the user to make the map full-screen. Defaults to true. |\n| `drawingToolsControl` | Boolean, optional | Whether to show the control that allows the user to add or edit the geometry drawing tools. Defaults to true. |"]]