GoogleMaps Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMSMarkerLayer
GMSMarkerLayer
is a subclass of GMSOverlayLayer
, available on a per-marker basis, that allows
animation of several properties of its associated GMSMarker
.
Note that this CALayer
is never actually rendered directly, as GMSMapView
is provided
entirely via an OpenGL layer. As such, adjustments or animations to ‘default’ properties of
CALayer
will not have any effect.
-
Declaration
Swift
var latitude: CLLocationDegrees { get set }
Objective-C
@property (nonatomic) CLLocationDegrees latitude;
-
Declaration
Swift
var longitude: CLLocationDegrees { get set }
Objective-C
@property (nonatomic) CLLocationDegrees longitude;
-
Declaration
Swift
var rotation: CLLocationDegrees { get set }
Objective-C
@property (nonatomic) CLLocationDegrees rotation;
-
Declaration
Swift
var opacity: Float { get set }
Objective-C
@property float opacity;
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\u003eGMSMarkerLayer\u003c/code\u003e is a subclass of \u003ccode\u003eGMSOverlayLayer\u003c/code\u003e used for animating properties of a \u003ccode\u003eGMSMarker\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt allows animation of latitude, longitude, rotation, and opacity of the associated marker.\u003c/p\u003e\n"],["\u003cp\u003eThis layer is not directly rendered and relies on the OpenGL layer of \u003ccode\u003eGMSMapView\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAdjustments or animations to default properties of \u003ccode\u003eCALayer\u003c/code\u003e will not affect \u003ccode\u003eGMSMarkerLayer\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# GoogleMaps Framework Reference\n\nGMSMarkerLayer\n==============\n\n @interface GMSMarkerLayer : ../Classes/GMSOverlayLayer.html\n\n`GMSMarkerLayer` is a subclass of [GMSOverlayLayer](../Classes/GMSOverlayLayer.html), available on a per-marker basis, that allows\nanimation of several properties of its associated [GMSMarker](../Classes/GMSMarker.html).\n\nNote that this `CALayer` is never actually rendered directly, as [GMSMapView](../Classes/GMSMapView.html) is provided\nentirely via an OpenGL layer. As such, adjustments or animations to 'default' properties of\n`CALayer` will not have any effect.\n- `\n ``\n ``\n `\n\n ### [latitude](#/c:objc(cs)GMSMarkerLayer(py)latitude)\n\n `\n ` \n Latitude, part of `position` on [GMSMarker](../Classes/GMSMarker.html). \n\n #### Declaration\n\n Swift \n\n var latitude: CLLocationDegrees { get set }\n\n Objective-C \n\n @property (nonatomic) CLLocationDegrees latitude;\n\n- `\n ``\n ``\n `\n\n ### [longitude](#/c:objc(cs)GMSMarkerLayer(py)longitude)\n\n `\n ` \n Longitude, part of `position` on [GMSMarker](../Classes/GMSMarker.html). \n\n #### Declaration\n\n Swift \n\n var longitude: CLLocationDegrees { get set }\n\n Objective-C \n\n @property (nonatomic) CLLocationDegrees longitude;\n\n- `\n ``\n ``\n `\n\n ### [rotation](#/c:objc(cs)GMSMarkerLayer(py)rotation)\n\n `\n ` \n Rotation, as per [GMSMarker](../Classes/GMSMarker.html). \n\n #### Declaration\n\n Swift \n\n var rotation: CLLocationDegrees { get set }\n\n Objective-C \n\n @property (nonatomic) CLLocationDegrees rotation;\n\n- `\n ``\n ``\n `\n\n ### [opacity](#/c:objc(cs)GMSMarkerLayer(py)opacity)\n\n `\n ` \n Opacity, as per [GMSMarker](../Classes/GMSMarker.html). \n\n #### Declaration\n\n Swift \n\n var opacity: Float { get set }\n\n Objective-C \n\n @property float opacity;"]]