Anuncio: Todos los proyectos no comerciales registrados para usar Earth Engine antes del
15 de abril de 2025 deben
verificar su elegibilidad no comercial para mantener el acceso a Earth Engine.
Map.setControlVisibility
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Establece la visibilidad de los controles en el mapa.
Devuelve este objeto ui.Map.
Uso | Muestra |
---|
Map.setControlVisibility(all, layerList, zoomControl, scaleControl, mapTypeControl, fullscreenControl, drawingToolsControl) | ui.Map |
Argumento | Tipo | Detalles |
---|
all | Booleano, opcional | Indica si se deben mostrar todos los controles. Si es falso, se ocultan todos los controles; si es verdadero, se muestran todos los controles. Se anula con los parámetros establecidos de forma individual. Ten en cuenta que establecer este parámetro de forma explícita afectará cualquier control adicional que se agregue en el futuro. |
layerList | Booleano, opcional | Cuando es falso, oculta el panel de la lista de capas o, cuando es verdadero, permite que la visibilidad del panel de la lista de capas se determine por la presencia de capas en la lista. La configuración predeterminada es mostrar la lista. |
zoomControl | Booleano, opcional | Indica si el control de zoom está visible. El valor predeterminado es verdadero. |
scaleControl | Booleano, opcional | Indica si se debe mostrar el control que indica la escala en el nivel de zoom actual del mapa. El valor predeterminado es verdadero. |
mapTypeControl | Booleano, opcional | Indica si se debe mostrar el control que permite al usuario cambiar el mapa base. El valor predeterminado es verdadero. |
fullscreenControl | Booleano, opcional | Indica si se debe mostrar el control que permite al usuario ver el mapa en pantalla completa. El valor predeterminado es verdadero. |
drawingToolsControl | Booleano, opcional | Indica si se debe mostrar el control que permite al usuario agregar o editar las herramientas de dibujo de geometría. El valor predeterminado es verdadero. |
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2025-07-26 (UTC)
[null,null,["Última actualización: 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. |"]]