Announcement: On
November 13, 2024, all users will need to
use a Cloud project in order to access Earth Engine. After this date, continued individual access without a Cloud project will require
an exception.
Map.setControlVisibility
Sets the visibility of the controls on the map.
Returns this ui.Map.
Usage | Returns | Map.setControlVisibility(all, layerList, zoomControl, scaleControl, mapTypeControl, fullscreenControl, drawingToolsControl) | ui.Map |
Argument | Type | Details | 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. |
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. |
zoomControl | Boolean, optional | Whether the zoom control is visible. Defaults to true. |
scaleControl | Boolean, optional | Whether to show the control which indicates the scale at the map's current zoom level. Defaults to true. |
mapTypeControl | Boolean, optional | Whether to show the control that allows the user to change the base map. Defaults to true. |
fullscreenControl | Boolean, optional | Whether to show the control that allows the user to make the map full-screen. Defaults to true. |
drawingToolsControl | Boolean, optional | Whether to show the control that allows the user to add or edit the geometry drawing tools. Defaults to true. |
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 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["Sets the visibility of map controls, such as zoom, scale, layer list, map type, fullscreen, and drawing tools."],["Uses a single function, `Map.setControlVisibility()`, to manage the visibility of all or individual controls."],["Provides granular control over each control's visibility with boolean parameters (true for visible, false for hidden)."],["The `all` parameter can show or hide all controls at once, but individual settings override it."],["By default, most controls are visible unless explicitly hidden."]]],[]]