카메라 조정
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
카메라를 사용하면 지도의 사용자 시점을 변경할 수 있습니다. 카메라 모드를 사용하여 내비게이션 중에 지도 뷰의 동작을 제어할 수 있습니다.
카메라 모드를 설정하려면 카메라와 연결된 다음 메서드 중 하나를 호출하세요.
내 위치 따라가기 (GoogleMap.followMyLocation
) - 내비게이션의 기본 카메라 모드입니다. 이 모드는 카메라를 기기 또는 차량에 설정합니다.
내비게이션 중에 카메라가 이동 방향을 자동으로 향합니다.
위치에 고정 (GoogleMap.animateCamera
및 GoogleMap.moveCamera
): 카메라를 특정 위치에 고정합니다. 이 모드를 사용하면 방위, 기울기, 줌 등 다른 카메라 속성과 함께 카메라 위치를 설정할 수 있습니다. 이 뷰를 선택하고 탐색기가 초기화되면 가운데로 다시 지정 버튼이 표시됩니다.
경로 개요 표시 (NavigationView.showRouteOverview
또는 SupportNavigationFragment.showRouteOverview
) - 남은 경로 (최대 다음 45분 운전 시간)의 개요를 표시하고, 필요에 따라 경로가 지도 뷰에 맞도록 상하/좌우로 이동하고 확대/축소합니다. 이 보기를 선택하면 가운데로 다시 지정 버튼이 표시됩니다.
가운데로 다시 지정 버튼을 클릭하면 카메라가 followMyLocation
모드로 설정됩니다.
내 위치 모드 따르기
가장 일반적인 카메라 설정은 카메라를 기기나 차량에 설정하여 이동 중에 현재 위치를 표시하는 것입니다. 이 카메라 모드에서는 자동차가 항상 화면 위쪽을 향하는 각진 시점 (CameraPerspective.TILTED
)으로 경로를 볼 수 있으며, 자동차가 북쪽 (CameraPerspective.TOP_DOWN_NORTH_UP
) 또는 방향 (CameraPerspective.TOP_DOWN_HEADING_UP)
)을 향해 이동하는 것을 화면 상단에서 항상 볼 수 있습니다.
다음 코드 프래그먼트는 TILTED
관점을 사용합니다.
// Set the camera to follow the device (vehicle):
mNavFragment.getMapAsync(googleMap -> googleMap.followMyLocation(CameraPerspective.TILTED))
위치 모드로 고정됨
Pinned
모드를 사용하면 카메라를 가장 많이 제어할 수 있습니다. 이 모드에서는 특정 위치에 카메라를 배치하고, 카메라 뷰를 방향 지정하기 위해 방위를 할당하고, 기울기를 변경하여 시야각을 설정하고, 카메라의 확대/축소 수준을 설정합니다.
다음 코드 스니펫은 카메라를 이동하는 일반적인 방법을 몇 가지 보여줍니다.
private static final LatLng SYDNEY = new LatLng(-33.88, 151.21);
private static final LatLng MOUNTAIN_VIEW = new LatLng(37.4, -122.1);
private GoogleMap map;
... // Obtain the map from a SupportNavigationFragment or NavigationView.
// Move the camera instantly to Sydney with a zoom of 15.
map.moveCamera(CameraUpdateFactory.newLatLngZoom(SYDNEY, 15));
// Zoom in, animating the camera.
map.animateCamera(CameraUpdateFactory.zoomIn());
// Zoom out to zoom level 10, animating with a duration of 2 seconds.
map.animateCamera(CameraUpdateFactory.zoomTo(10), 2000, null);
// Construct a CameraPosition focusing on Mountain View and animate the camera to that position.
CameraPosition cameraPosition = new CameraPosition.Builder()
.target(MOUNTAIN_VIEW) // Sets the center of the map to Mountain View
.zoom(17) // Sets the zoom
.bearing(90) // Sets the orientation of the camera to east
.tilt(30) // Sets the tilt of the camera to 30 degrees
.build(); // Creates a CameraPosition from the builder
map.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
전체 경로 보기 모드 표시
showRouteOverview
카메라 설정은 전체 여정을 표시합니다.
여러 목적지가 있는 여정의 경우 이 모드에는 아직 이동하지 않은 경로 부분이 표시됩니다.
// Place the camera to see the remaining route:
mNavFragment.showRouteOverview();
다음 단계
지도에 표시되는 기본 제공 UI 구성요소를 지정하여 사용자가 지도와 상호작용하는 방식을 맞춤설정하는 방법을 알아보려면 탐색 UI 맞춤설정을 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-31(UTC)
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eThe Navigation SDK offers three camera modes: \u003ccode\u003efollowMyLocation\u003c/code\u003e, \u003ccode\u003ePinned to location\u003c/code\u003e, and \u003ccode\u003eshowRouteOverview\u003c/code\u003e to control the user's viewpoint of the map during navigation.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003efollowMyLocation\u003c/code\u003e mode centers the map on the user's location and automatically adjusts during navigation, while \u003ccode\u003ePinned to location\u003c/code\u003e mode fixes the camera at a specific location with customizable properties.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eshowRouteOverview\u003c/code\u003e mode displays the entire route or remaining route, adjusting the view to fit the route on the screen.\u003c/p\u003e\n"],["\u003cp\u003eYou can customize the camera's perspective, zoom level, bearing, and tilt to enhance the user experience.\u003c/p\u003e\n"],["\u003cp\u003eHigh detail setting, when enabled, displays 2-D building outlines when the zoom level is 19 or higher, which can be further customized using \u003ccode\u003eFollowMyLocationOptions\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Adjust the camera\n\nThe camera allows you to change the user's viewpoint of the map. You can\nuse camera modes to control the behavior of the map view during navigation.\nTo set the camera mode, call one of the following methods associated\nwith the camera:\n\n- Follow my location (`GoogleMap.followMyLocation`) --- The default camera\n mode for navigation. This mode sets the camera to the device or vehicle.\n During navigation, the camera automatically faces the direction of travel.\n\n- Pinned to location (`GoogleMap.animateCamera` and `GoogleMap.moveCamera`)\n --- Fixes the camera at a specific location. When using this mode, you can\n set the camera location along with other camera properties like bearing, tilt,\n zoom, etc. When this view is selected and the Navigator has been initialized,\n the **Re-center** button is visible.\n\n- Show route overview (`NavigationView.showRouteOverview` or\n `SupportNavigationFragment.showRouteOverview`) --- Displays an overview\n of the remaining route (up to the next 45 minutes of driving time), panning and zooming as needed to fit the route\n into the map view. When this view is selected, the **Re-center** button\n is visible.\n\nClicking the **Re-center** button sets the camera to `followMyLocation` mode.\n\nFollow my location mode\n-----------------------\n\nThe most common camera setting is to have the camera set to the\ndevice or vehicle, showing its current position within the journey. In\nthis camera mode, you can view the route with the car always headed up\nthe screen with an angled perspective (`CameraPerspective.TILTED`), or\nyou can see the car traveling with north (`CameraPerspective.TOP_DOWN_NORTH_UP`)\nor with heading (`CameraPerspective.TOP_DOWN_HEADING_UP)` always at the top of\nthe screen.\n\nThe following code fragment uses the `TILTED` perspective: \n\n // Set the camera to follow the device (vehicle):\n mNavFragment.getMapAsync(googleMap -\u003e googleMap.followMyLocation(CameraPerspective.TILTED))\n\nPinned to location mode\n-----------------------\n\nThe `Pinned` mode provides you with the most control of the\ncamera. In this mode, you place the camera in a specific location, assign\na bearing to orient the camera view, change the tilt to set the viewing angle, and\nset the camera's zoom level.\n\nThe following code snippet demonstrates some of the common ways to move the\ncamera. \n\n private static final LatLng SYDNEY = new LatLng(-33.88, 151.21);\n private static final LatLng MOUNTAIN_VIEW = new LatLng(37.4, -122.1);\n\n private GoogleMap map;\n ... // Obtain the map from a SupportNavigationFragment or NavigationView.\n\n // Move the camera instantly to Sydney with a zoom of 15.\n map.moveCamera(CameraUpdateFactory.newLatLngZoom(SYDNEY, 15));\n\n // Zoom in, animating the camera.\n map.animateCamera(CameraUpdateFactory.zoomIn());\n\n // Zoom out to zoom level 10, animating with a duration of 2 seconds.\n map.animateCamera(CameraUpdateFactory.zoomTo(10), 2000, null);\n\n // Construct a CameraPosition focusing on Mountain View and animate the camera to that position.\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(MOUNTAIN_VIEW) // Sets the center of the map to Mountain View\n .zoom(17) // Sets the zoom\n .bearing(90) // Sets the orientation of the camera to east\n .tilt(30) // Sets the tilt of the camera to 30 degrees\n .build(); // Creates a CameraPosition from the builder\n map.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n\nShow route overview mode\n------------------------\n\nThe `showRouteOverview` camera setting displays the entire journey.\nFor multiple-destination journeys, this mode displays the untraveled\nportion of the route. \n\n // Place the camera to see the remaining route:\n mNavFragment.showRouteOverview();\n\nNext step\n---------\n\nSee [Customize the Navigation UI](/maps/documentation/navigation/android-sdk/controls)\nto learn how to customize the way in which users interact with your map\nby determining which of the built-in UI components appear on the map."]]