GoogleNavigation Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMSGroundOverlay
GMSGroundOverlay
specifies the available options for a ground overlay that exists on the
Earth’s surface. Unlike a marker, the position of a ground overlay is specified explicitly and it
does not face the camera.
-
The position of this GMSGroundOverlay
, or more specifically, the physical position of its
anchor. If this is changed, bounds
will be moved around the new position.
Declaration
Swift
var position: CLLocationCoordinate2D { get set }
Objective-C
@property (nonatomic) CLLocationCoordinate2D position;
-
The anchor specifies where this GMSGroundOverlay
is anchored to the Earth in relation to
bounds
. If this is modified, position
will be set to the corresponding new position within
bounds
.
Declaration
Swift
var anchor: CGPoint { get set }
Objective-C
@property (nonatomic) CGPoint anchor;
-
Icon to render within bounds
on the Earth. If this is nil, the overlay will not be visible
(unlike GMSMarker
which has a default image).
Declaration
Swift
var icon: UIImage? { get set }
Objective-C
@property (nonatomic, nullable) UIImage *icon;
-
Sets the opacity of the ground overlay, between 0 (completely transparent) and 1 (default)
inclusive.
Declaration
Swift
var opacity: Float { get set }
Objective-C
@property (nonatomic) float opacity;
-
Bearing of this ground overlay, in degrees. The default value, zero, points this ground overlay
up/down along the normal Y axis of the earth.
Declaration
Swift
var bearing: CLLocationDirection { get set }
Objective-C
@property (nonatomic) CLLocationDirection bearing;
-
The 2D bounds on the Earth in which icon
is drawn. Changing this value will adjust position
accordingly.
-
Convenience constructor for GMSGroundOverlay
for a particular bounds
and icon
. Will set
position
accordingly.
Declaration
Objective-C
+ (nonnull instancetype)groundOverlayWithBounds:
(nullable GMSCoordinateBounds *)bounds
icon:(nullable UIImage *)icon;
-
Constructs a GMSGroundOverlay
that renders the given icon
at position
, as if the image’s
actual size matches camera pixels at zoomLevel
.
Declaration
Swift
convenience init(position: CLLocationCoordinate2D, icon: UIImage?, zoomLevel: CGFloat)
Objective-C
+ (nonnull instancetype)groundOverlayWithPosition:
(CLLocationCoordinate2D)position
icon:(nullable UIImage *)icon
zoomLevel:(CGFloat)zoomLevel;
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\u003eGMSGroundOverlay\u003c/code\u003e is a non-facing-camera overlay used to display images on the Earth's surface within specified boundaries.\u003c/p\u003e\n"],["\u003cp\u003eIts position is determined by an anchor point within its bounds and can be rotated using the bearing property.\u003c/p\u003e\n"],["\u003cp\u003eThe overlay's appearance is customizable through properties like \u003ccode\u003eicon\u003c/code\u003e, \u003ccode\u003eopacity\u003c/code\u003e, and \u003ccode\u003ebounds\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can create ground overlays using convenience constructors specifying either bounds and icon or position, icon, and zoom level.\u003c/p\u003e\n"],["\u003cp\u003eUnlike markers, ground overlays do not have a default image and will not be visible if the \u003ccode\u003eicon\u003c/code\u003e property is nil.\u003c/p\u003e\n"]]],[],null,["# GoogleNavigation Framework Reference\n\nGMSGroundOverlay\n================\n\n @interface GMSGroundOverlay : ../Classes/GMSOverlay.html\n\n`GMSGroundOverlay` specifies the available options for a ground overlay that exists on the\nEarth's surface. Unlike a marker, the position of a ground overlay is specified explicitly and it\ndoes not face the camera.\n- `\n ``\n ``\n `\n\n ### [position](#/c:objc(cs)GMSGroundOverlay(py)position)\n\n `\n ` \n The position of this `GMSGroundOverlay`, or more specifically, the physical position of its\n anchor. If this is changed, [bounds](../Classes/GMSGroundOverlay.html#/c:objc(cs)GMSGroundOverlay(py)bounds) will be moved around the new position. \n\n #### Declaration\n\n Swift \n\n var position: CLLocationCoordinate2D { get set }\n\n Objective-C \n\n @property (nonatomic) CLLocationCoordinate2D position;\n\n- `\n ``\n ``\n `\n\n ### [anchor](#/c:objc(cs)GMSGroundOverlay(py)anchor)\n\n `\n ` \n The anchor specifies where this `GMSGroundOverlay` is anchored to the Earth in relation to\n [bounds](../Classes/GMSGroundOverlay.html#/c:objc(cs)GMSGroundOverlay(py)bounds). If this is modified, [position](../Classes/GMSGroundOverlay.html#/c:objc(cs)GMSGroundOverlay(py)position) will be set to the corresponding new position within\n [bounds](../Classes/GMSGroundOverlay.html#/c:objc(cs)GMSGroundOverlay(py)bounds). \n\n #### Declaration\n\n Swift \n\n var anchor: CGPoint { get set }\n\n Objective-C \n\n @property (nonatomic) CGPoint anchor;\n\n- `\n ``\n ``\n `\n\n ### [icon](#/c:objc(cs)GMSGroundOverlay(py)icon)\n\n `\n ` \n Icon to render within [bounds](../Classes/GMSGroundOverlay.html#/c:objc(cs)GMSGroundOverlay(py)bounds) on the Earth. If this is nil, the overlay will not be visible\n (unlike [GMSMarker](../Classes/GMSMarker.html) which has a default image). \n\n #### Declaration\n\n Swift \n\n var icon: UIImage? { get set }\n\n Objective-C \n\n @property (nonatomic, nullable) UIImage *icon;\n\n- `\n ``\n ``\n `\n\n ### [opacity](#/c:objc(cs)GMSGroundOverlay(py)opacity)\n\n `\n ` \n Sets the opacity of the ground overlay, between 0 (completely transparent) and 1 (default)\n inclusive. \n\n #### Declaration\n\n Swift \n\n var opacity: Float { get set }\n\n Objective-C \n\n @property (nonatomic) float opacity;\n\n- `\n ``\n ``\n `\n\n ### [bearing](#/c:objc(cs)GMSGroundOverlay(py)bearing)\n\n `\n ` \n Bearing of this ground overlay, in degrees. The default value, zero, points this ground overlay\n up/down along the normal Y axis of the earth. \n\n #### Declaration\n\n Swift \n\n var bearing: CLLocationDirection { get set }\n\n Objective-C \n\n @property (nonatomic) CLLocationDirection bearing;\n\n- `\n ``\n ``\n `\n\n ### [bounds](#/c:objc(cs)GMSGroundOverlay(py)bounds)\n\n `\n ` \n The 2D bounds on the Earth in which [icon](../Classes/GMSGroundOverlay.html#/c:objc(cs)GMSGroundOverlay(py)icon) is drawn. Changing this value will adjust [position](../Classes/GMSGroundOverlay.html#/c:objc(cs)GMSGroundOverlay(py)position)\n accordingly. \n\n #### Declaration\n\n Swift \n\n var bounds: ../Classes/GMSCoordinateBounds.html? { get set }\n\n Objective-C \n\n @property (nonatomic, nullable) ../Classes/GMSCoordinateBounds.html *bounds;\n\n- `\n ``\n ``\n `\n\n ### [+groundOverlayWithBounds:icon:](#/c:objc(cs)GMSGroundOverlay(cm)groundOverlayWithBounds:icon:)\n\n `\n ` \n Convenience constructor for `GMSGroundOverlay` for a particular [bounds](../Classes/GMSGroundOverlay.html#/c:objc(cs)GMSGroundOverlay(py)bounds) and [icon](../Classes/GMSGroundOverlay.html#/c:objc(cs)GMSGroundOverlay(py)icon). Will set\n [position](../Classes/GMSGroundOverlay.html#/c:objc(cs)GMSGroundOverlay(py)position) accordingly. \n\n #### Declaration\n\n Swift \n\n convenience init(bounds: ../Classes/GMSCoordinateBounds.html?, icon: UIImage?)\n\n Objective-C \n\n + (nonnull instancetype)groundOverlayWithBounds:\n (nullable ../Classes/GMSCoordinateBounds.html *)bounds\n icon:(nullable UIImage *)icon;\n\n- `\n ``\n ``\n `\n\n ### [+groundOverlayWithPosition:icon:zoomLevel:](#/c:objc(cs)GMSGroundOverlay(cm)groundOverlayWithPosition:icon:zoomLevel:)\n\n `\n ` \n Constructs a `GMSGroundOverlay` that renders the given [icon](../Classes/GMSGroundOverlay.html#/c:objc(cs)GMSGroundOverlay(py)icon) at [position](../Classes/GMSGroundOverlay.html#/c:objc(cs)GMSGroundOverlay(py)position), as if the image's\n actual size matches camera pixels at `zoomLevel`. \n\n #### Declaration\n\n Swift \n\n convenience init(position: CLLocationCoordinate2D, icon: UIImage?, zoomLevel: CGFloat)\n\n Objective-C \n\n + (nonnull instancetype)groundOverlayWithPosition:\n (CLLocationCoordinate2D)position\n icon:(nullable UIImage *)icon\n zoomLevel:(CGFloat)zoomLevel;"]]