iOS용 Maps SDK를 사용하면 지도에 표시할 기본 제공 UI 구성요소와
허용되는 동작을 지정하여 사용자가 지도와 상호작용하는 방식을
맞춤설정할 수 있습니다.
지도 제어 도구
iOS용 Maps SDK는 iOS용 Google 지도 애플리케이션에 있는 컨트롤과 유사한 UI 컨트롤을 기본으로 제공합니다. GMSUISettings 클래스를 사용하여 이러한 컨트롤의 표시 여부를 전환할 수 있습니다.
이 클래스의 변경사항은 지도에 즉시 반영됩니다.
나침반
iOS용 Maps SDK는 특정 상황에서 지도의 오른쪽 상단에 표시되는 나침반 그래픽을 제공합니다. 나침반은 카메라의 방향이 방위가 0이 아닌 상태로 설정되어 있는 경우에만 표시됩니다. 사용자가 나침반을 클릭하면 카메라가 방위가 0인 위치 (기본 방향)로 다시 움직이고 나침반은 바로 사라집니다.
나침반은 기본적으로 비활성화되어 있습니다. GMSUISettings의 compassButton 속성을 YES로 설정하여 나침반을 사용 설정할 수 있습니다. 하지만 나침반이 항상 표시되도록 설정할 수는 없습니다.
내 위치 버튼은 내 위치 버튼이 사용 설정된 경우에만
화면의 오른쪽 하단에 표시됩니다. 사용자가 버튼을 클릭하면 사용자의 위치를 알고 있는 경우 카메라가 사용자의 현재 위치에 초점을 맞추도록 애니메이션이 적용됩니다. GMSUISettings의 myLocationButton 속성을 YES로 설정하여 버튼을 사용 설정할 수 있습니다.
Swift
mapView.settings.myLocationButton=true
Objective-C
mapView.settings.myLocationButton=YES;
층 선택기
실내 지도가 눈에 띄게 표시되면 층 선택기 컨트롤이 화면의 오른쪽 하단에 표시됩니다. 실내 지도가 2개 이상 표시되면 층 선택기는 화면 중앙에 가장 가까운 건물과 관련이 있습니다. 각 건물에는 기본 층이 있으며 선택기가 처음 표시될 때 이 층이 선택됩니다. 선택기에서 다양한 층을 선택할 수 있습니다.
GMSUISettings의 indoorPicker 속성을 NO로 설정하여 층 선택기 컨트롤을 사용 중지할 수 있습니다.
Swift
mapView.settings.indoorPicker=false
Objective-C
mapView.settings.indoorPicker=NO;
지도 동작
GMSMapView의 속성으로 제공되는 GMSUISettings 클래스의 속성을 설정하여 지도에서 기본 동작을 사용 중지할 수 있습니다.
다음 제스처는 프로그래밍 방식으로 활성화/비활성화할 수 있습니다. 동작을 사용 중지해도 카메라 설정에 대한 프로그래매틱 액세스는 제한되지 않습니다.
scrollGestures - 스크롤 동작의 사용 설정 또는 사용 중지 여부를 제어합니다. 이 제스처가 활성화된 경우, 사용자가 카메라를 스와이프해서 패닝할 수 있습니다.
zoomGestures - 확대/축소 동작의 사용 설정 여부를 제어합니다. 사용 설정하면 사용자가 두 번 탭하거나, 두 손가락으로 탭하거나, 핀치하여 카메라를 확대할 수 있습니다. scrollGestures가 사용 설정된 상태에서 두 번 탭하거나 손가락으로 확대/축소하면 카메라가 지정된 지점으로 이동할 수 있습니다.
tiltGestures - 기울기 동작의 사용 설정 여부를 제어합니다. 사용 설정하면 사용자가 두 손가락으로 위아래로 스와이프하여 카메라를 기울일 수 있습니다.
rotateGestures - 회전 동작의 사용 설정 또는 사용 중지 여부를 제어합니다. 사용 설정하면 사용자가 두 손가락 회전 동작을 사용하여 카메라를 회전할 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eThis documentation outlines how to customize user interaction with the Google Maps SDK for iOS, focusing on controlling built-in UI components and map gestures.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can enable or disable UI controls like the compass, My Location button, and floor picker using the \u003ccode\u003eGMSUISettings\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eMap gestures such as scrolling, zooming, tilting, and rotating can be individually enabled or disabled through properties of the \u003ccode\u003eGMSUISettings\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eDisabling a gesture does not restrict programmatic access to camera settings, only user interaction.\u003c/p\u003e\n"],["\u003cp\u003eThese customizations provide developers with flexibility to tailor the map experience within their iOS applications.\u003c/p\u003e\n"]]],["The Maps SDK for iOS allows customization of user interaction with the map via the `GMSUISettings` class. Built-in UI controls, like the compass, My Location button, and floor picker, can be toggled on or off. The compass is enabled by setting `compassButton` to `YES`, the My Location button with `myLocationButton = YES`, and the floor picker is disabled by `indoorPicker = NO`. Map gestures (scroll, zoom, tilt, rotate) can be enabled or disabled by setting the properties of the same name to `YES` or `NO` respectively.\n"],null,["\u003cbr /\u003e\n\nSelect platform: [Android](/maps/documentation/android-sdk/controls \"View this page for the Android platform docs.\") [iOS](/maps/documentation/ios-sdk/controls \"View this page for the iOS platform docs.\") [JavaScript](/maps/documentation/javascript/controls \"View this page for the JavaScript platform docs.\")\n\n\u003cbr /\u003e\n\nUsing the Maps SDK for iOS, you can customize the way in which users\ninteract with your map, by determining which of the built in UI components\nappear on the map and which gestures are allowed.\n\nMap controls\n\nThe Maps SDK for iOS provides some built-in UI controls that are\nsimilar to those found in the Google Maps for iOS application. You can\ntoggle the visibility of these controls using the `GMSUISettings` class.\nChanges made on this class are immediately reflected on the map.\n| **Note:** Each control has a predetermined position relative to the edge of the map. You can move the controls away from the edges by [padding](/maps/documentation/ios-sdk/map#map_padding) the map.\n\nCompass \n\nThe Maps SDK for iOS provides a compass graphic which appears in the\ntop right corner of the map under certain circumstances. The compass will only\nappear when the camera is oriented such that it has a non-zero bearing. When the\nuser clicks on the compass, the camera animates back to a position with bearing\nof zero (the default orientation) and the compass fades away shortly afterwards.\n\nThe compass is disabled by default. You can enable the compass by setting the\n`compassButton` property of `GMSUISettings` to `YES`. However, you cannot\nforce the compass to always be shown.\n\n\nSwift \n\n```swift\nlet camera = GMSCameraPosition(latitude: 37.757815, longitude: -122.50764, zoom: 12)\nlet mapView = GMSMapView(frame: .zero, camera: camera)\nmapView.settings.compassButton = true\n \n```\n\nObjective-C \n\n```objective-c\nGMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:37.757815\n longitude:-122.50764\n zoom:12];\nGMSMapView *mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera];\nmapView.settings.compassButton = YES;\n \n```\n\n\u003cbr /\u003e\n\nMy Location button \n\nThe My Location button appears in the bottom right corner of the screen *only*\nwhen the My Location button is enabled. When a user clicks the button, the\ncamera animates to focus on the user's current location if the user's location\nis known. You can enable the button by setting the\n`myLocationButton` property of `GMSUISettings` to `YES`.\n\n\nSwift \n\n```swift\nmapView.settings.myLocationButton = true\n \n```\n\nObjective-C \n\n```objective-c\nmapView.settings.myLocationButton = YES;\n \n```\n\n\u003cbr /\u003e\n\nFloor picker \n\nThe floor picker control appears near the bottom right of the screen whenever an\nindoor map is featured prominently. When two or more indoor maps are visible the\nfloor picker relates to the building nearest to the center of the screen. Each\nbuilding has a default floor which is selected when the picker is first\ndisplayed. You can choose a different floor by selecting it from the picker.\n\nYou can disable the floor picker control by setting the `indoorPicker` property\nof `GMSUISettings` to `NO`.\n\n\nSwift \n\n```swift\nmapView.settings.indoorPicker = false\n \n```\n\nObjective-C \n\n```objective-c\nmapView.settings.indoorPicker = NO;\n \n```\n\n\u003cbr /\u003e\n\nMap gestures\n\nYou can disable the default gestures on the map by setting properties of the\n`GMSUISettings` class, which is available as a property of the `GMSMapView`.\nThe following gestures can be enabled and disabled programmatically. Note that\ndisabling the gesture won't limit programmatic access to the camera\nsettings.\n\n- `scrollGestures` --- controls whether scroll gestures are enabled or disabled. If enabled, users may swipe to pan the camera.\n- `zoomGestures` --- controls whether zoom gestures are enabled or disabled. If enabled, users may double tap, two-finger tap, or pinch to zoom the camera. Note that double tapping or pinching when `scrollGestures` are enabled may pan the camera to the specified point.\n- `tiltGestures` --- controls whether tilt gestures are enabled or disabled. If enabled, users may use a two-finger vertical down or up swipe to tilt the camera.\n- `rotateGestures` --- controls whether rotate gestures are enabled or disabled. If enabled, users may use a two-finger rotate gesture to rotate the camera.\n\nIn the example below, both pan and zoom gestures have been disabled.\n\n\nSwift \n\n```swift\noverride func loadView() {\n let camera = GMSCameraPosition.camera(\n withLatitude: 1.285,\n longitude: 103.848,\n zoom: 12\n )\n\n let mapView = GMSMapView.map(withFrame: .zero, camera: camera)\n mapView.settings.scrollGestures = false\n mapView.settings.zoomGestures = false\n self.view = mapView\n}\n \n```\n\nObjective-C \n\n```objective-c\n- (void)loadView {\n GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:1.285\n longitude:103.848\n zoom:12];\n GMSMapView *mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera];\n mapView.settings.scrollGestures = NO;\n mapView.settings.zoomGestures = NO;\n self.view = mapView;\n}\n \n```\n\n\u003cbr /\u003e"]]