GoogleNavigation Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMSMapLayer
GMSMapLayer
is a custom subclass of CALayer
, provided as the layer class on GMSMapView
.
This layer should not be instantiated directly. It provides model access to the camera normally
defined on GMSMapView
.
Modifying or animating these properties will typically interrupt any current gesture on
GMSMapView
, e.g., a user’s pan or rotation. Similarly, if a user performs an enabled gesture
during an animation, the animation will stop ‘in-place’ (at the current presentation value).
-
Declaration
Swift
var cameraLatitude: CLLocationDegrees { get set }
Objective-C
@property(nonatomic) CLLocationDegrees cameraLatitude
-
Declaration
Swift
var cameraLongitude: CLLocationDegrees { get set }
Objective-C
@property(nonatomic) CLLocationDegrees cameraLongitude
-
Declaration
Swift
var cameraBearing: CLLocationDirection { get set }
Objective-C
@property(nonatomic) CLLocationDirection cameraBearing
-
Declaration
Swift
var cameraZoomLevel: Float { get set }
Objective-C
@property(nonatomic) float cameraZoomLevel
-
Declaration
Swift
var cameraViewingAngle: Double { get set }
Objective-C
@property(nonatomic) double cameraViewingAngle
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMSMapLayer\u003c/code\u003e is a custom subclass of \u003ccode\u003eCALayer\u003c/code\u003e used as the layer class for \u003ccode\u003eGMSMapView\u003c/code\u003e and should not be directly instantiated.\u003c/p\u003e\n"],["\u003cp\u003eIt provides access to the camera properties like latitude, longitude, bearing, zoom level, and viewing angle, usually controlled through \u003ccode\u003eGMSMapView\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eModifying or animating these properties might interrupt ongoing user gestures on the map, and user gestures during animations will halt the animation.\u003c/p\u003e\n"]]],["`GMSMapLayer`, a subclass of `CALayer`, is the layer class on `GMSMapView`. It provides model access to the map's camera and should not be directly instantiated. Key properties include `cameraLatitude`, `cameraLongitude`, `cameraBearing`, `cameraZoomLevel`, and `cameraViewingAngle`, all of which can be modified or animated. Modifying these camera properties may interrupt gestures, and user gestures during animations will halt them. These properties are settable in both Swift and Objective-C.\n"],null,["# GoogleNavigation Framework Reference\n\nGMSMapLayer\n===========\n\n @interface GMSMapLayer : ../Classes/GMSCALayer.html\n\n`GMSMapLayer` is a custom subclass of `CALayer`, provided as the layer class on [GMSMapView](../Classes/GMSMapView.html).\nThis layer should not be instantiated directly. It provides model access to the camera normally\ndefined on [GMSMapView](../Classes/GMSMapView.html).\n\nModifying or animating these properties will typically interrupt any current gesture on\n[GMSMapView](../Classes/GMSMapView.html), e.g., a user's pan or rotation. Similarly, if a user performs an enabled gesture\nduring an animation, the animation will stop 'in-place' (at the current presentation value).\n- `\n ``\n ``\n `\n\n ### [cameraLatitude](#/c:objc(cs)GMSMapLayer(py)cameraLatitude)\n\n `\n ` \n\n #### Declaration\n\n Swift \n\n var cameraLatitude: CLLocationDegrees { get set }\n\n Objective-C \n\n @property(nonatomic) CLLocationDegrees cameraLatitude\n\n- `\n ``\n ``\n `\n\n ### [cameraLongitude](#/c:objc(cs)GMSMapLayer(py)cameraLongitude)\n\n `\n ` \n\n #### Declaration\n\n Swift \n\n var cameraLongitude: CLLocationDegrees { get set }\n\n Objective-C \n\n @property(nonatomic) CLLocationDegrees cameraLongitude\n\n- `\n ``\n ``\n `\n\n ### [cameraBearing](#/c:objc(cs)GMSMapLayer(py)cameraBearing)\n\n `\n ` \n\n #### Declaration\n\n Swift \n\n var cameraBearing: CLLocationDirection { get set }\n\n Objective-C \n\n @property(nonatomic) CLLocationDirection cameraBearing\n\n- `\n ``\n ``\n `\n\n ### [cameraZoomLevel](#/c:objc(cs)GMSMapLayer(py)cameraZoomLevel)\n\n `\n ` \n\n #### Declaration\n\n Swift \n\n var cameraZoomLevel: Float { get set }\n\n Objective-C \n\n @property(nonatomic) float cameraZoomLevel\n\n- `\n ``\n ``\n `\n\n ### [cameraViewingAngle](#/c:objc(cs)GMSMapLayer(py)cameraViewingAngle)\n\n `\n ` \n\n #### Declaration\n\n Swift \n\n var cameraViewingAngle: Double { get set }\n\n Objective-C \n\n @property(nonatomic) double cameraViewingAngle"]]