GoogleNavigation 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 properties like latitude, longitude, rotation, and opacity, corresponding to the associated \u003ccode\u003eGMSMarker\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis layer is not directly rendered and adjustments to default \u003ccode\u003eCALayer\u003c/code\u003e properties won't have any effect as \u003ccode\u003eGMSMapView\u003c/code\u003e is rendered via OpenGL.\u003c/p\u003e\n"]]],["`GMSMarkerLayer` is a subclass of `GMSOverlayLayer` that enables animating properties of `GMSMarker`. It allows the adjustment of a marker's `latitude` and `longitude` which both compose its position. It also permits modification of the marker's `rotation` and `opacity`. Importantly, direct rendering or default `CALayer` property adjustments are ineffective due to the `GMSMapView`'s OpenGL layer implementation.\n"],null,["# GoogleNavigation 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;"]]