GMSUISettings.h 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. //
  2. // GMSUISettings.h
  3. // Google Maps SDK for iOS
  4. //
  5. // Copyright 2013 Google Inc.
  6. //
  7. // Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of
  8. // Service: https://developers.google.com/maps/terms
  9. //
  10. /** Settings for the user interface of a GMSMapView. */
  11. @interface GMSUISettings : NSObject
  12. /**
  13. * Sets the preference for whether all gestures should be enabled (default) or
  14. * disabled. This doesn't restrict users from tapping any on screen buttons to
  15. * move the camera (e.g., compass or zoom controls), nor does it restrict
  16. * programmatic movements and animation.
  17. */
  18. - (void)setAllGesturesEnabled:(BOOL)enabled;
  19. /**
  20. * Controls whether scroll gestures are enabled (default) or disabled. If
  21. * enabled, users may drag to pan the camera. This does not limit programmatic
  22. * movement of the camera.
  23. */
  24. @property(nonatomic, assign) BOOL scrollGestures;
  25. /**
  26. * Controls whether zoom gestures are enabled (default) or disabled. If
  27. * enabled, users may double tap/two-finger tap or pinch to zoom the camera.
  28. * This does not limit programmatic movement of the camera.
  29. */
  30. @property(nonatomic, assign) BOOL zoomGestures;
  31. /**
  32. * Controls whether tilt gestures are enabled (default) or disabled. If enabled,
  33. * users may use a two-finger vertical down or up swipe to tilt the camera. This
  34. * does not limit programmatic control of the camera's viewingAngle.
  35. */
  36. @property(nonatomic, assign) BOOL tiltGestures;
  37. /**
  38. * Controls whether rotate gestures are enabled (default) or disabled. If
  39. * enabled, users may use a two-finger rotate gesture to rotate the camera. This
  40. * does not limit programmatic control of the camera's bearing.
  41. */
  42. @property(nonatomic, assign) BOOL rotateGestures;
  43. /**
  44. * Controls whether gestures by users are completely consumed by the GMSMapView
  45. * when gestures are enabled (default YES). This prevents these gestures from
  46. * being received by parent views.
  47. *
  48. * When the GMSMapView is contained by a UIScrollView (or other scrollable area),
  49. * this means that gestures on the map will not be additional consumed as scroll
  50. * gestures. However, disabling this (set to NO) may be userful to support
  51. * complex view hierarchies or requirements.
  52. */
  53. @property(nonatomic, assign) BOOL consumesGesturesInView;
  54. /**
  55. * Enables or disables the compass. The compass is an icon on the map that
  56. * indicates the direction of north on the map.
  57. *
  58. * If enabled, it is only shown when the camera is rotated away from its default
  59. * orientation (bearing of 0). When a user taps the compass, the camera orients
  60. * itself to its default orientation and fades away shortly after. If disabled,
  61. * the compass will never be displayed.
  62. */
  63. @property(nonatomic, assign) BOOL compassButton;
  64. /**
  65. * Enables or disables the My Location button. This is a button visible on the
  66. * map that, when tapped by users, will center the map on the current user
  67. * location.
  68. */
  69. @property(nonatomic, assign) BOOL myLocationButton;
  70. /**
  71. * Enables (default) or disables the indoor floor picker. If enabled, it is only
  72. * visible when the view is focused on a building with indoor floor data.
  73. * If disabled, the selected floor can still be controlled programatically via
  74. * the indoorDisplay mapView property.
  75. */
  76. @property(nonatomic, assign) BOOL indoorPicker;
  77. /**
  78. * Controls whether rotate and zoom gestures can be performed off-center and scrolled around
  79. * (default YES).
  80. */
  81. @property(nonatomic, assign) BOOL allowScrollGesturesDuringRotateOrZoom;
  82. @end