GMSUISettings Class Reference

GMSUISettings Class Reference

Overview

Settings for the user interface of a GMSMapView.

Public Member Functions

(void) - setAllGesturesEnabled:
 Sets the preference for whether all gestures should be enabled (default) or disabled.

Properties

BOOL scrollGestures
 Controls whether scroll gestures are enabled (default) or disabled.
BOOL zoomGestures
 Controls whether zoom gestures are enabled (default) or disabled.
BOOL tiltGestures
 Controls whether tilt gestures are enabled (default) or disabled.
BOOL rotateGestures
 Controls whether rotate gestures are enabled (default) or disabled.
BOOL consumesGesturesInView
 Controls whether gestures by users are completely consumed by the GMSMapView when gestures are enabled (default YES).
BOOL compassButton
 Enables or disables the compass.
BOOL myLocationButton
 Enables or disables the My Location button.
BOOL indoorPicker
 Enables (default) or disables the indoor floor picker.
BOOL allowScrollGesturesDuringRotateOrZoom
 Controls whether rotate and zoom gestures can be performed off-center and scrolled around (default YES).

Member Function Documentation

- (void) setAllGesturesEnabled: (BOOL)  enabled

Sets the preference for whether all gestures should be enabled (default) or disabled.

This doesn't restrict users from tapping any on screen buttons to move the camera (e.g., compass or zoom controls), nor does it restrict programmatic movements and animation.


Property Documentation

- (BOOL) scrollGestures [read, write, assign]

Controls whether scroll gestures are enabled (default) or disabled.

If enabled, users may drag to pan the camera. This does not limit programmatic movement of the camera.

- (BOOL) zoomGestures [read, write, assign]

Controls whether zoom gestures are enabled (default) or disabled.

If enabled, users may double tap/two-finger tap or pinch to zoom the camera. This does not limit programmatic movement of the camera.

- (BOOL) tiltGestures [read, write, assign]

Controls whether tilt gestures are enabled (default) or disabled.

If enabled, users may use a two-finger vertical down or up swipe to tilt the camera. This does not limit programmatic control of the camera's viewingAngle.

- (BOOL) rotateGestures [read, write, assign]

Controls whether rotate gestures are enabled (default) or disabled.

If enabled, users may use a two-finger rotate gesture to rotate the camera. This does not limit programmatic control of the camera's bearing.

- (BOOL) consumesGesturesInView [read, write, assign]

Controls whether gestures by users are completely consumed by the GMSMapView when gestures are enabled (default YES).

This prevents these gestures from being received by parent views.

When the GMSMapView is contained by a UIScrollView (or other scrollable area), this means that gestures on the map will not be additional consumed as scroll gestures. However, disabling this (set to NO) may be useful to support complex view hierarchies or requirements.

- (BOOL) compassButton [read, write, assign]

Enables or disables the compass.

The compass is an icon on the map that indicates the direction of north on the map.

If enabled, it is only shown when the camera is rotated away from its default orientation (bearing of 0). When a user taps the compass, the camera orients itself to its default orientation and fades away shortly after. If disabled, the compass will never be displayed.

- (BOOL) myLocationButton [read, write, assign]

Enables or disables the My Location button.

This is a button visible on the map that, when tapped by users, will center the map on the current user location.

- (BOOL) indoorPicker [read, write, assign]

Enables (default) or disables the indoor floor picker.

If enabled, it is only visible when the view is focused on a building with indoor floor data. If disabled, the selected floor can still be controlled programmatically via the indoorDisplay mapView property.

- (BOOL) allowScrollGesturesDuringRotateOrZoom [read, write, assign]

Controls whether rotate and zoom gestures can be performed off-center and scrolled around (default YES).