You're all set!

To start developing, please head over to our developer documentation.

Activate the Google Maps SDK for iOS

To get you started we'll guide you through the Google Developers Console to do a few things first:

  1. Create or choose a project
  2. Activate the Google Maps SDK for iOS
  3. Create appropriate keys
Continue

GMSGroundOverlay Class Reference

GMSGroundOverlay Class Reference

Overview

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.

Inherits GMSOverlay.

Static Public Member Functions

(instancetype) + groundOverlayWithBounds:icon:
 Convenience constructor for GMSGroundOverlay for a particular bounds and icon.
(instancetype) + groundOverlayWithPosition:icon:zoomLevel:
 Constructs a GMSGroundOverlay that renders the given icon at position, as if the image's actual size matches camera pixels at zoomLevel.

Properties

CLLocationCoordinate2D position
 The position of this GMSGroundOverlay, or more specifically, the physical position of its anchor.
CGPoint anchor
 The anchor specifies where this GMSGroundOverlay is anchored to the Earth in relation to bounds.
UIImage *_Nullable icon
 Icon to render within bounds on the Earth.
float opacity
 Sets the opacity of the ground overlay, between 0 (completely transparent) and 1 (default) inclusive.
CLLocationDirection bearing
 Bearing of this ground overlay, in degrees.
GMSCoordinateBounds *_Nullable bounds
 The 2D bounds on the Earth in which icon is drawn.
NSString *_Nullable title
 Title, a short description of the overlay.
GMSMapView *_Nullable map
 The map this overlay is on.
BOOL tappable
 If this overlay should cause tap notifications.
int zIndex
 Higher zIndex value overlays will be drawn on top of lower zIndex value tile layers and overlays.

Member Function Documentation

+ (instancetype) groundOverlayWithBounds: (GMSCoordinateBounds *_Nullable)  bounds
icon: (UIImage *_Nullable)  icon 

Convenience constructor for GMSGroundOverlay for a particular bounds and icon.

Will set position accordingly.

+ (instancetype) groundOverlayWithPosition: (CLLocationCoordinate2D)  position
icon: (UIImage *_Nullable)  icon
zoomLevel: (CGFloat)  zoomLevel 

Constructs a GMSGroundOverlay that renders the given icon at position, as if the image's actual size matches camera pixels at zoomLevel.


Property Documentation

- (CLLocationCoordinate2D) position [read, write, assign]

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.

- (CGPoint) anchor [read, write, assign]

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.

- (UIImage* _Nullable) icon [read, write, assign]

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).

- (float) opacity [read, write, assign]

Sets the opacity of the ground overlay, between 0 (completely transparent) and 1 (default) inclusive.

- (CLLocationDirection) bearing [read, write, assign]

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.

- (GMSCoordinateBounds* _Nullable) bounds [read, write, assign]

The 2D bounds on the Earth in which icon is drawn.

Changing this value will adjust position accordingly.

- (NSString* _Nullable) title [read, write, copy, inherited]

Title, a short description of the overlay.

Some overlays, such as markers, will display the title on the map. The title is also the default accessibility text.

- (GMSMapView* _Nullable) map [read, write, assign, inherited]

The map this overlay is on.

Setting this property will add the overlay to the map. Setting it to nil removes this overlay from the map. An overlay may be active on at most one map at any given time.

- (BOOL) tappable [read, write, assign, inherited]

If this overlay should cause tap notifications.

Some overlays, such as markers, will default to being tappable.

- (int) zIndex [read, write, assign, inherited]

Higher zIndex value overlays will be drawn on top of lower zIndex value tile layers and overlays.

Equal values result in undefined draw ordering. Markers are an exception that regardless of zIndex, they will always be drawn above tile layers and other non-marker overlays; they are effectively considered to be in a separate z-index group compared to other overlays.

Send feedback about...

Google Maps SDK for iOS
Google Maps SDK for iOS
Need help? Visit our support page.