공지사항:
2025년 4월 15일 전에 Earth Engine 사용을 위해 등록된 모든 비상업용 프로젝트는 Earth Engine 액세스를 유지하기 위해
비상업용 자격 요건을 인증해야 합니다.
Map.setLocked
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
지도에서 화면 이동 및 확대/축소를 제한합니다.
- 화면 이동과 확대/축소를 모두 잠그려면 locked를 true로 설정하고 다른 것은 설정하지 않습니다.
- 이동을 허용하고 최소 및 최대 확대/축소를 제한하려면 locked를 false로 설정하고 minZoom 및 maxZoom 매개변수를 제공합니다.
- 이동을 허용하지 않고 최소 및 최대 확대/축소를 제한하려면 locked를 true로 설정하고 minZoom 및 maxZoom 매개변수를 제공합니다.
- 지도를 기본값으로 재설정하려면 locked를 false로 설정하고 다른 항목은 설정하지 않습니다.
사용 | 반환 값 |
---|
Map.setLocked(locked, minZoom, maxZoom) | |
인수 | 유형 | 세부정보 |
---|
locked | 불리언 | 지도를 잠글지 여부입니다. |
minZoom | 숫자, 선택사항 | (선택사항) 지도의 최소 확대/축소입니다(0~24, 양 끝 값 포함). |
maxZoom | 숫자, 선택사항 | (선택사항) 지도의 최대 확대/축소입니다. 0~24(양 끝 값 포함)입니다. |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003e\u003ccode\u003eMap.setLocked()\u003c/code\u003e enables control over map panning and zooming by setting the \u003ccode\u003elocked\u003c/code\u003e parameter.\u003c/p\u003e\n"],["\u003cp\u003eSetting \u003ccode\u003elocked\u003c/code\u003e to \u003ccode\u003etrue\u003c/code\u003e restricts map movement, while \u003ccode\u003efalse\u003c/code\u003e allows interaction.\u003c/p\u003e\n"],["\u003cp\u003eOptional \u003ccode\u003eminZoom\u003c/code\u003e and \u003ccode\u003emaxZoom\u003c/code\u003e parameters further refine zoom levels when \u003ccode\u003elocked\u003c/code\u003e is used.\u003c/p\u003e\n"],["\u003cp\u003eTo reset the map to default behavior, set \u003ccode\u003elocked\u003c/code\u003e to \u003ccode\u003efalse\u003c/code\u003e without specifying \u003ccode\u003eminZoom\u003c/code\u003e or \u003ccode\u003emaxZoom\u003c/code\u003e.\u003c/p\u003e\n"]]],["The `Map.setLocked()` function controls map panning and zooming. Setting `locked` to `true` disables panning. `minZoom` and `maxZoom` (0-24) define zoom limits, applicable whether panning is locked or not. Setting `locked` to `false` with no other parameters resets the map. To allow panning and limit zoom, set `locked` to false with `minZoom` and `maxZoom`. `True` `locked` with `minZoom` and `maxZoom` disallows panning but limits zooming.\n"],null,["# Map.setLocked\n\n\u003cbr /\u003e\n\nLimits panning and zooming on the map.\n\n\u003cbr /\u003e\n\n- To lock both panning and zooming, set locked to true and nothing else.\n\n- To allow panning and limit the min and max zoom, set locked to false and supply the minZoom and maxZoom parameters.\n\n- To disallow panning and limit min and max zoom, set locked to true and supply the minZoom and maxZoom parameters.\n\n- To reset the map to default, set locked to false and nothing else.\n\n| Usage | Returns |\n|----------------------------------------------------|---------|\n| `Map.setLocked(locked, `*minZoom* `, `*maxZoom*`)` | |\n\n| Argument | Type | Details |\n|-----------|------------------|-----------------------------------------------------------------------|\n| `locked` | Boolean | Whether the map should be locked or not. |\n| `minZoom` | Number, optional | (optional) The minimum zoom for the map, between 0 and 24, inclusive. |\n| `maxZoom` | Number, optional | (optional) The maximum zoom for the map, between 0 and 24, inclusive. |"]]