Map.setControlVisibility
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
قابلیت مشاهده کنترل ها را روی نقشه تنظیم می کند.
این ui.Map را برمی گرداند.
استفاده | برمی گرداند | Map.setControlVisibility( all , layerList , zoomControl , scaleControl , mapTypeControl , fullscreenControl , drawingToolsControl ) | ui.Map |
استدلال | تایپ کنید | جزئیات | all | بولی، اختیاری | نمایش همه کنترلها. نادرست تمام کنترل ها را پنهان می کند. true تمام کنترل ها را نشان می دهد. با پارامترهای تنظیم شده به صورت جداگانه لغو شد. توجه داشته باشید که تنظیم این صراحتاً بر هر کنترل اضافی اضافه شده در آینده تأثیر می گذارد. |
layerList | بولی، اختیاری | هنگامی که نادرست است، پانل لیست لایه را پنهان می کند یا در صورت درست بودن، اجازه می دهد تا پانل لیست لایه ها با وجود لایه ها در لیست مشخص شود. پیش فرض این است که لیست را نشان دهد. |
zoomControl | بولی، اختیاری | اینکه آیا کنترل زوم قابل مشاهده است یا خیر. پیش فرض ها به درست است. |
scaleControl | بولی، اختیاری | آیا برای نشان دادن کنترلی که مقیاس را در سطح بزرگنمایی فعلی نقشه نشان می دهد یا خیر. پیش فرض ها به درست است. |
mapTypeControl | بولی، اختیاری | آیا برای نمایش کنترلی که به کاربر اجازه می دهد نقشه پایه را تغییر دهد. پیش فرض ها به درست است. |
fullscreenControl | بولی، اختیاری | آیا برای نمایش کنترلی که به کاربر اجازه می دهد نقشه را تمام صفحه کند. پیش فرض ها به درست است. |
drawingToolsControl | بولی، اختیاری | آیا برای نشان دادن کنترلی که به کاربر اجازه می دهد ابزارهای ترسیم هندسه را اضافه یا ویرایش کند. پیش فرض ها به درست است. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\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. |"]]