GoogleMaps 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 used to display images on the Earth's surface, positioned explicitly and not facing the camera like markers.\u003c/p\u003e\n"],["\u003cp\u003eIt is defined by its \u003ccode\u003eposition\u003c/code\u003e, \u003ccode\u003eanchor\u003c/code\u003e, \u003ccode\u003eicon\u003c/code\u003e, \u003ccode\u003eopacity\u003c/code\u003e, \u003ccode\u003ebearing\u003c/code\u003e, and \u003ccode\u003ebounds\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou can set the opacity for transparency and bearing for rotation.\u003c/p\u003e\n"],["\u003cp\u003eConvenience constructors help create ground overlays with bounds and icons or position, icon, and zoom level.\u003c/p\u003e\n"]]],["`GMSGroundOverlay` defines options for overlays on Earth's surface, distinct from camera-facing markers. Key actions include setting the overlay's `position`, `anchor`, `icon`, `opacity`, `bearing`, and `bounds`. `position` specifies the anchor's location; `anchor` relates the overlay's placement to `bounds`. `icon` renders an image; `opacity` controls transparency. `bearing` sets the overlay's orientation. Constructors allow creating overlays with specified `bounds` and `icon` or with a `position`, `icon` and `zoomLevel`.\n"],null,["# GoogleMaps 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;"]]