GoogleMaps 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 of the \u003ccode\u003eGMSMapView\u003c/code\u003e, like latitude, longitude, bearing, zoom level, and viewing angle.\u003c/p\u003e\n"],["\u003cp\u003eModifying or animating \u003ccode\u003eGMSMapLayer\u003c/code\u003e properties can interrupt user gestures on the map and vice-versa.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use these properties to programmatically control the map's camera view.\u003c/p\u003e\n"]]],[],null,["# GoogleMaps 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"]]