Overview
GMSCameraUpdate represents an update that may be applied to a GMSMapView.
It encapsulates some logic for modifying the current camera.
It should only be constructed using the factory helper methods below.
Static Public Member Functions | |
(GMSCameraUpdate *) | + zoomIn |
Returns a GMSCameraUpdate that zooms in on the map. | |
(GMSCameraUpdate *) | + zoomOut |
Returns a GMSCameraUpdate that zooms out on the map. | |
(GMSCameraUpdate *) | + zoomBy: |
Returns a GMSCameraUpdate that changes the zoom by the specified amount. | |
(GMSCameraUpdate *) | + zoomTo: |
Returns a GMSCameraUpdate that sets the zoom to the specified amount. | |
(GMSCameraUpdate *) | + setTarget: |
Returns a GMSCameraUpdate that sets the camera target to the specified coordinate. | |
(GMSCameraUpdate *) | + setTarget:zoom: |
Returns a GMSCameraUpdate that sets the camera target and zoom to the specified values. | |
(GMSCameraUpdate *) | + setCamera: |
Returns a GMSCameraUpdate that sets the camera to the specified GMSCameraPosition. | |
(GMSCameraUpdate *) | + fitBounds: |
Returns a GMSCameraUpdate that transforms the camera such that the specified bounds are centered on screen at the greatest possible zoom level. | |
(GMSCameraUpdate *) | + fitBounds:withPadding: |
This is similar to fitBounds: but allows specifying the padding (in points) in order to inset the bounding box from the view's edges. | |
(GMSCameraUpdate *) | + fitBounds:withEdgeInsets: |
This is similar to fitBounds: but allows specifying edge insets in order to inset the bounding box from the view's edges. | |
(GMSCameraUpdate *) | + scrollByX:Y: |
Returns a GMSCameraUpdate that shifts the center of the view by the specified number of points in the x and y directions. | |
(GMSCameraUpdate *) | + zoomBy:atPoint: |
Returns a GMSCameraUpdate that zooms with a focus point; the focus point stays fixed on screen. |
Member Function Documentation
+ (GMSCameraUpdate *) zoomIn |
Returns a GMSCameraUpdate that zooms in on the map.
The zoom increment is 1.0.
+ (GMSCameraUpdate *) zoomOut |
Returns a GMSCameraUpdate that zooms out on the map.
The zoom increment is -1.0.
+ (GMSCameraUpdate *) zoomBy: | (float) | delta |
Returns a GMSCameraUpdate that changes the zoom by the specified amount.
+ (GMSCameraUpdate *) zoomTo: | (float) | zoom |
Returns a GMSCameraUpdate that sets the zoom to the specified amount.
+ (GMSCameraUpdate *) setTarget: | (CLLocationCoordinate2D) | target |
Returns a GMSCameraUpdate that sets the camera target to the specified coordinate.
+ (GMSCameraUpdate *) setTarget: | (CLLocationCoordinate2D) | target | |
zoom: | (float) | zoom | |
Returns a GMSCameraUpdate that sets the camera target and zoom to the specified values.
+ (GMSCameraUpdate *) setCamera: | (GMSCameraPosition *) | camera |
Returns a GMSCameraUpdate that sets the camera to the specified GMSCameraPosition.
+ (GMSCameraUpdate *) fitBounds: | (GMSCoordinateBounds *) | bounds |
Returns a GMSCameraUpdate that transforms the camera such that the specified bounds are centered on screen at the greatest possible zoom level.
The bounds will have a default padding of 64 points.
The returned camera update will set the camera's bearing and tilt to their default zero values (i.e., facing north and looking directly at the Earth).
+ (GMSCameraUpdate *) fitBounds: | (GMSCoordinateBounds *) | bounds | |
withPadding: | (CGFloat) | padding | |
This is similar to fitBounds: but allows specifying the padding (in points) in order to inset the bounding box from the view's edges.
If the requested padding
is larger than the view size in either the vertical or horizontal direction the map will be maximally zoomed out.
+ (GMSCameraUpdate *) fitBounds: | (GMSCoordinateBounds *) | bounds | |
withEdgeInsets: | (UIEdgeInsets) | edgeInsets | |
This is similar to fitBounds: but allows specifying edge insets in order to inset the bounding box from the view's edges.
If the requested edgeInsets
are larger than the view size in either the vertical or horizontal direction the map will be maximally zoomed out.
+ (GMSCameraUpdate *) scrollByX: | (CGFloat) | dX | |
Y: | (CGFloat) | dY | |
Returns a GMSCameraUpdate that shifts the center of the view by the specified number of points in the x and y directions.
X grows to the right, Y grows down.
+ (GMSCameraUpdate *) zoomBy: | (float) | zoom | |
atPoint: | (CGPoint) | point | |
Returns a GMSCameraUpdate that zooms with a focus point; the focus point stays fixed on screen.