공지사항:
2025년 4월 15일 전에 Earth Engine 사용을 위해 등록된 모든 비상업용 프로젝트는 Earth Engine 액세스를 유지하기 위해
비상업용 자격 요건을 인증해야 합니다.
ui.Map.setControlVisibility
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
지도에 표시되는 컨트롤의 공개 상태를 설정합니다.
이 ui.Map을 반환합니다.
사용 | 반환 값 |
---|
Map.setControlVisibility(all, layerList, zoomControl, scaleControl, mapTypeControl, fullscreenControl, drawingToolsControl) | ui.Map |
인수 | 유형 | 세부정보 |
---|
다음과 같은 경우: ui.map | ui.Map | ui.Map 인스턴스입니다. |
all | 불리언, 선택사항 | 모든 컨트롤을 표시할지 여부입니다. false는 모든 컨트롤을 숨기고 true는 모든 컨트롤을 표시합니다. 개별적으로 설정된 매개변수에 의해 재정의됩니다. 이 값을 명시적으로 설정하면 향후 추가되는 컨트롤에 영향을 미칩니다. |
layerList | 불리언, 선택사항 | false인 경우 레이어 목록 패널을 숨기고, true인 경우 목록에 레이어가 있는지에 따라 레이어 목록 패널의 표시 여부를 결정할 수 있습니다. 기본값은 목록을 표시하는 것입니다. |
zoomControl | 불리언, 선택사항 | 확대/축소 컨트롤이 표시되는지 여부입니다. 기본값은 true입니다. |
scaleControl | 불리언, 선택사항 | 지도의 현재 확대/축소 수준에서 축척을 나타내는 컨트롤을 표시할지 여부입니다. 기본값은 true입니다. |
mapTypeControl | 불리언, 선택사항 | 사용자가 기본 지도를 변경할 수 있는 컨트롤을 표시할지 여부입니다. 기본값은 true입니다. |
fullscreenControl | 불리언, 선택사항 | 사용자가 지도를 전체 화면으로 만들 수 있는 컨트롤을 표시할지 여부입니다. 기본값은 true입니다. |
drawingToolsControl | 불리언, 선택사항 | 사용자가 기하학 그리기 도구를 추가하거나 수정할 수 있는 컨트롤을 표시할지 여부입니다. 그리기 도구가 이전에 지도에 추가된 경우 기본값은 true입니다. 그리기 도구가 이전에 지도에 추가되지 않은 경우 무시됩니다. |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003eControls the visibility of map elements like zoom, scale, layer list, and map type selection.\u003c/p\u003e\n"],["\u003cp\u003eAllows for customization by showing or hiding individual controls or all at once.\u003c/p\u003e\n"],["\u003cp\u003eUses Boolean values (true/false) to set the visibility of each control element.\u003c/p\u003e\n"],["\u003cp\u003eProvides control over the fullscreen and drawing tools visibility, if enabled on the map.\u003c/p\u003e\n"],["\u003cp\u003eAffects the display of the layer list panel based on the presence of layers and user preference.\u003c/p\u003e\n"]]],["The `Map.setControlVisibility` function modifies the visibility of map controls. It accepts boolean arguments to show or hide controls: `all`, `layerList`, `zoomControl`, `scaleControl`, `mapTypeControl`, `fullscreenControl`, and `drawingToolsControl`. Setting `all` to true/false shows/hides all controls unless overridden. `layerList` determines the visibility of the layer list panel. The function returns the modified `ui.Map` instance, and each control defaults to visible (true), except `drawingToolsControl` that needs the drawing tools to have been added before.\n"],null,["# ui.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| this: `ui.map` | ui.Map | The ui.Map instance. |\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 if the drawing tools were previously added to the map. Ignored if the drawing tools were not previously added to the map. |"]]