AI-generated Key Takeaways
- 
          The Google Maps SDK for iOS provides classes for displaying and interacting with maps, including features like markers, polygons, and polylines. 
- 
          Core map classes like GMSMapViewandGMSCameraPositionhandle map display, camera control, and user interaction.
- 
          Overlays such as GMSMarker,GMSCircle, andGMSPolygonenable the addition of visual elements to the map.
- 
          Indoor maps and Street View panoramas are supported through classes like GMSIndoorBuildingandGMSPanoramaView.
- 
          Feature layers and styling options allow for customization of the map's appearance using classes like GMSFeatureLayerandGMSFeatureStyle.
Classes
The following classes are available globally.
- 
                  
                  A result from a reverse geocode request, containing a human-readable address. This class is immutable and should not be instantiated directly unless under testing circumstances. Obtain an instance via GMSGeocoder.Some of the fields may be nil, indicating they are not present. DeclarationSwift class GMSAddress : NSObject, NSCopying, NSSecureCodingObjective-C @interface GMSAddress : NSObject <NSCopying, NSSecureCoding>
- 
                  
                  GMSCALayeris a superclass used by layers in the Google Maps SDK for iOS, such asGMSMapLayerandGMSPanoramaLayer.This is an implementation detail and it should not be instantiated directly. DeclarationSwift class GMSCALayer : CALayerObjective-C @interface GMSCALayer : CALayer
- 
                  
                  An immutable class that aggregates all camera position parameters. DeclarationSwift class GMSCameraPosition : NSObject, NSCopying, NSMutableCopyingObjective-C @interface GMSCameraPosition : NSObject <NSCopying, NSMutableCopying>
- 
                  
                  Mutable version of GMSCameraPosition.DeclarationSwift class GMSMutableCameraPosition : GMSCameraPositionObjective-C @interface GMSMutableCameraPosition : GMSCameraPosition
- 
                  
                  GMSCameraUpdaterepresents an update that may be applied to aGMSMapView.It encapsulates some logic for modifying the current camera. It should only be constructed using the factory helper methods below. DeclarationSwift class GMSCameraUpdate : NSObjectObjective-C @interface GMSCameraUpdate : NSObject
- 
                  
                  A circle on the Earth’s surface (spherical cap). 
- 
                  
                  GMSCoordinateBounds represents a rectangular bounding box on the Earth’s surface. GMSCoordinateBounds is immutable and can’t be modified after construction. DeclarationSwift class GMSCoordinateBounds : NSObjectObjective-C @interface GMSCoordinateBounds : NSObject
- 
                  
                  An interface representing a feature from a dataset. The featureType of a DatasetFeature will always be GMSFeatureTypeDataset.DeclarationSwift class DatasetFeature : NSObject, FeatureObjective-C @interface GMSDatasetFeature : NSObject <GMSFeature>
- 
                  
                  An interface representing a feature layer for a dataset. The featureType of a GMSDatasetFeatureLayerwill always beGMSFeatureTypeDataset.DeclarationSwift class DatasetFeatureLayer : FeatureLayer<DatasetFeature>Objective-C @interface GMSDatasetFeatureLayer : GMSFeatureLayer <GMSDatasetFeature *>
- 
                  
                  A class representing a collection of all features of the same GMSFeatureType, whose style can be overridden on the client. EachGMSFeatureTypewill have one correspondingGMSFeatureLayer.DeclarationSwift class FeatureLayer<T> : NSObject where T : FeatureObjective-C @interface GMSFeatureLayer<__covariant T : id <GMSFeature>> : NSObject
- 
                  
                  Specifies how a map feature should appear when displayed on a map. DeclarationSwift class FeatureStyle : NSObject, NSCopying, NSMutableCopyingObjective-C @interface GMSFeatureStyle : NSObject <NSCopying, NSMutableCopying>
- 
                  
                  Mutable version of GMSFeatureStyle. DeclarationSwift class MutableFeatureStyle : FeatureStyleObjective-C @interface GMSMutableFeatureStyle : GMSFeatureStyle
- 
                  
                  Exposes a service for reverse geocoding. This maps Earth coordinates (latitude and longitude) to a collection of addresses near that coordinate. DeclarationSwift class GMSGeocoder : NSObjectObjective-C @interface GMSGeocoder : NSObject
- 
                  
                  A collection of results from a reverse geocode request. DeclarationSwift class GMSReverseGeocodeResponse : NSObject, NSCopyingObjective-C @interface GMSReverseGeocodeResponse : NSObject <NSCopying>
- 
                  
                  GMSGroundOverlayspecifies 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.DeclarationSwift class GMSGroundOverlay : GMSOverlayObjective-C @interface GMSGroundOverlay : GMSOverlay
- 
                  
                  Describes a building which contains levels. DeclarationSwift class GMSIndoorBuilding : NSObjectObjective-C @interface GMSIndoorBuilding : NSObject
- 
                  
                  Provides ability to observe or control the display of indoor level data. Like GMSMapView,GMSIndoorDisplaymay only be used from the main thread.DeclarationSwift class GMSIndoorDisplay : NSObjectObjective-C @interface GMSIndoorDisplay : NSObject
- 
                  
                  DeclarationSwift class GMSIndoorLevel : NSObjectObjective-C @interface GMSIndoorLevel : NSObject - (instancetype)init NS_UNAVAILABLE; /** Localized display name for the level, e.g. "Ground floor". */ @property(nonatomic, copy, readonly, nullable) NSString *name; /** Localized short display name for the level, e.g. "1". */ @property(nonatomic, copy, readonly, nullable) NSString *shortName; @end
- 
                  
                  An opaque identifier for a custom map configuration. DeclarationSwift class GMSMapID : NSObject, NSCopyingObjective-C @interface GMSMapID : NSObject <NSCopying>
- 
                  
                  GMSMapLayeris a custom subclass ofCALayer, provided as the layer class onGMSMapView. This layer should not be instantiated directly. It provides model access to the camera normally defined onGMSMapView.Modifying or animating these properties will typically interrupt any current gesture on GMSMapView, e.g., a user’s pan or rotation. Similarly, if a user performs an enabled gesture during an animation, the animation will stop ‘in-place’ (at the current presentation value).
- 
                  
                  GMSMapStyleholds details about a style which can be applied to a map.With style options you can customize the presentation of the standard Google map styles, changing the visual display of features like roads, parks, and other points of interest. As well as changing the style of these features, you can also hide features entirely. This means that you can emphasize particular components of the map or make the map complement the content of your app. For more information see: https://developers.google.com/maps/documentation/ios-sdk/styling DeclarationSwift class GMSMapStyle : NSObjectObjective-C @interface GMSMapStyle : NSObject
- 
                  
                  This is the main class of the Google Maps SDK for iOS and is the entry point for all methods related to the map. The map should be instantiated with one of the constructors -init or -initWithOptions:.GMSMapViewcan only be read and modified from the main thread, similar to allUIKitobjects. Calling these methods from another thread will result in an exception or undefined behavior.DeclarationSwift class GMSMapView : UIViewObjective-C @interface GMSMapView : UIView
- 
                  
                  This class defines initialization-time options for GMSMapView.DeclarationSwift class GMSMapViewOptions : NSObjectObjective-C @interface GMSMapViewOptions : NSObject
- 
                  
                  A marker is an icon placed at a particular point on the map’s surface. A marker’s icon is drawn oriented against the device’s screen rather than the map’s surface; i.e., it will not necessarily change orientation due to map rotations, tilting, or zooming. 
- 
                  
                  GMSMarkerLayeris a subclass ofGMSOverlayLayer, available on a per-marker basis, that allows animation of several properties of its associatedGMSMarker.Note that this CALayeris never actually rendered directly, asGMSMapViewis provided entirely via an OpenGL layer. As such, adjustments or animations to ‘default’ properties ofCALayerwill not have any effect.DeclarationSwift class GMSMarkerLayer : GMSOverlayLayerObjective-C @interface GMSMarkerLayer : GMSOverlayLayer
- 
                  
                  GMSOverlay is an abstract class that represents some overlay that may be attached to a specificGMSMapView. It may not be instantiated directly; instead, instances of concrete overlay typesshould be created directly (such asGMSMarker,GMSPolyline, andGMSPolygon).This supports the NSCopyingprotocol; [overlay_ copy] will return a copy of the overlay type, but withmapset to nil.DeclarationSwift class GMSOverlay : NSObject, NSCopyingObjective-C @interface GMSOverlay : NSObject <NSCopying>
- 
                  
                  GMSOverlayLayeris a custom subclass ofCALayer, and an abstract baseclass forGMSOverlaylayers that allow custom animations.Note that this CALayeror any subclass are never actually rendered directly, asGMSMapViewis provided entirely via anOpenGLlayer. As such, adjustments or animations to ‘default’ properties ofCALayerwill not have any effect.This is an implementation detail and it should not be instantiated directly. DeclarationSwift class GMSOverlayLayer : CALayerObjective-C @interface GMSOverlayLayer : CALayer
- 
                  
                  GMSPanoramarepresents metadata for a specific panorama on the Earth. This class is not instantiable directly and is obtained viaGMSPanoramaServiceorGMSPanoramaView.DeclarationSwift class GMSPanorama : NSObjectObjective-C @interface GMSPanorama : NSObject
- 
                  
                  GMSPanoramaCamerais used to control the viewing direction of aGMSPanoramaView. It does not contain information about which particular panorama should be displayed.DeclarationSwift class GMSPanoramaCamera : NSObjectObjective-C @interface GMSPanoramaCamera : NSObject
- 
                  
                  GMSPanoramaCameraUpdaterepresents an update that may be applied to aGMSPanoramaView. It encapsulates some logic for modifying the current camera. It should only be constructed using the factory helper methods below.DeclarationSwift class GMSPanoramaCameraUpdate : NSObjectObjective-C @interface GMSPanoramaCameraUpdate : NSObject
- 
                  
                  GMSPanoramaLayeris a custom subclass of CALayer, provided as the layer class onGMSPanoramaView. This layer should not be instantiated directly.DeclarationSwift class GMSPanoramaLayer : GMSCALayerObjective-C @interface GMSPanoramaLayer : GMSCALayer
- 
                  
                  Links from a GMSPanoramato neighboring panoramas.DeclarationSwift class GMSPanoramaLink : NSObjectObjective-C @interface GMSPanoramaLink : NSObject
- 
                  
                  GMSPanoramaServicecan be used to request panorama metadata even when aGMSPanoramaViewis not active.Get an instance like this: [[GMSPanoramaService alloc] init].DeclarationSwift class GMSPanoramaService : NSObjectObjective-C @interface GMSPanoramaService : NSObject
- 
                  
                  A panorama is used to display Street View imagery. It should be constructed via [[GMSPanoramaView alloc] initWithFrame:], and configured post-initialization.All properties and methods should be accessed on the main thread, similar to all UIKitobjects. TheGMSPanoramaViewDelegatemethods will also be called back only on the main thread.The backgroundColor of this view is shown while no panorama is visible, such as while it is loading or if the panorama is later set to nil. The alpha color of backgroundColor is not supported. DeclarationSwift class GMSPanoramaView : UIViewObjective-C @interface GMSPanoramaView : UIView
- 
                  
                  GMSPathencapsulates an immutable array ofCLLocationCooordinate2D. All the coordinates of aGMSPathmust be valid. The mutable counterpart isGMSMutablePath.DeclarationSwift class GMSPath : NSObject, NSCopying, NSMutableCopyingObjective-C @interface GMSPath : NSObject <NSCopying, NSMutableCopying>
- 
                  
                  Provides a custom pin image for an advanced marker. DeclarationSwift class GMSPinImage : UIImageObjective-C @interface GMSPinImage : UIImage
- 
                  
                  Provides a custom pin image glyph for an advanced marker. DeclarationSwift class GMSPinImageGlyph : NSObjectObjective-C @interface GMSPinImageGlyph : NSObject
- 
                  
                  Provides pin image customization for an advanced marker. DeclarationSwift class GMSPinImageOptions : NSObjectObjective-C @interface GMSPinImageOptions : NSObject
- 
                  
                  An interface representing a place feature (a feature with a Place ID). DeclarationSwift class PlaceFeature : NSObject, FeatureObjective-C @interface GMSPlaceFeature : NSObject <GMSFeature>
- 
                  
                  GMSPolygondefines a polygon that appears on the map. A polygon (like a polyline) defines a series of connected coordinates in an ordered sequence; additionally, polygons form a closed loop and define a filled region.
- 
                  
                  GMSPolygonLayeris a subclass ofGMSOverlayLayer, available on a per-polygon basis, that allows animation of several properties of its associatedGMSPolygon.Note that this CALayeris never actually rendered directly, asGMSMapViewis provided entirely via anOpenGLlayer. As such, adjustments or animations to ‘default’ properties ofCALayerwill not have any effect.DeclarationSwift class GMSPolygonLayer : GMSOverlayLayerObjective-C @interface GMSPolygonLayer : GMSOverlayLayer
- 
                  
                  GMSPolylinespecifies the available options for a polyline that exists on the Earth’s surface. It is drawn as a physical line between the points specified inpath.
- 
                  
                  Defines a mapping between Earth coordinates CLLocationCoordinate2Dand coordinates in the map’s viewCGPoint. A projection is constant and immutable, in that the mapping it embodies never changes. The mapping is not necessarily linear.Passing invalid Earth coordinates (i.e., per CLLocationCoordinate2DIsValid) to this object may result in undefined behavior.This class should not be instantiated directly unless under testing conditions. Instead, obtain it via projection on GMSMapView.DeclarationSwift class GMSProjection : NSObjectObjective-C @interface GMSProjection : NSObject
- 
                  
                  Service class for the Google Maps SDK for iOS. This class is not thread safe. All methods should only be invoked on the main thread. DeclarationSwift class GMSServices : NSObjectObjective-C @interface GMSServices : NSObject
- 
                  
                  The abstract base class for polyline styles that draw a repeating image over a GMSStyleSpan.DeclarationSwift class GMSStampStyle : NSObjectObjective-C @interface GMSStampStyle : NSObject
- 
                  
                  A polyline style that draws a repeating image over a GMSStyleSpan.DeclarationSwift class GMSTextureStyle : GMSStampStyleObjective-C @interface GMSTextureStyle : GMSStampStyle
- 
                  
                  Describes the drawing style for a stamp image over a GMSStyleSpan.Note Only supports transparent background. If any color is set to the GMSStyleSpanit will only be treated as a fallback.Note Use of GMSSpriteStylerequires Metal rendering framework. SeeGMSServices::setMetalRendererEnabled:(BOOL)to learn how to enable Metal. IfGMSStyleSpanis added to a map without Metal being enabled, the stamp will not render and instead the polyline span will attempt to fallback to any set color. If no color is set, it will fallback to the default polyline color, [UIColor blueColor].Note Use GMSMapView::mapCapabilitiesproperty to query if aGMSMapViewsupportsGMSSpriteStyle.DeclarationSwift class GMSSpriteStyle : GMSStampStyleObjective-C @interface GMSSpriteStyle : GMSStampStyle
- 
                  
                  Describes the drawing style for one-dimensional entities such as polylines. DeclarationSwift class GMSStrokeStyle : NSObjectObjective-C @interface GMSStrokeStyle : NSObject
- 
                  
                  Describes the style for some region of a polyline. DeclarationSwift class GMSStyleSpan : NSObjectObjective-C @interface GMSStyleSpan : NSObject
- 
                  
                  GMSSyncTileLayeris an abstract subclass ofGMSTileLayerthat provides a sync interface to generate image tile data.DeclarationSwift class GMSSyncTileLayer : GMSTileLayerObjective-C @interface GMSSyncTileLayer : GMSTileLayer
- 
                  
                  GMSTileLayeris an abstract class that allows overlaying of custom image tiles on a specifiedGMSMapView. It may not be initialized directly, and subclasses must implement the tileForX:y:zoom: method to return tiles.At zoom level 0 the whole world is a square covered by a single tile, and the coordinates xandyare both 0 for that tile. At zoom level 1, the world is covered by 4 tiles withxandybeing 0 or 1, and so on.DeclarationSwift class GMSTileLayer : NSObjectObjective-C @interface GMSTileLayer : NSObject
- 
                  
                  Settings for the user interface of a GMSMapView. DeclarationSwift class GMSUISettings : NSObjectObjective-C @interface GMSUISettings : NSObject
- 
                  
                  GMSURLTileProviderfetches tiles based on the URLs returned from aGMSTileURLConstructor. For example:GMSTileURLConstructor constructor = ^(NSUInteger x, NSUInteger y, NSUInteger zoom) { NSString *URLStr = [NSString stringWithFormat:@"https://example.com/%d/%d/%d.png", x, y, zoom]; return [NSURL URLWithString:URLStr]; }; GMSTileLayer *layer = [GMSURLTileLayer tileLayerWithURLConstructor:constructor]; layer.userAgent = @"SDK user agent"; layer.map = map;GMSURLTileProvidermay not be subclassed and should only be created via its convenience constructor.DeclarationSwift class GMSURLTileLayer : GMSTileLayerObjective-C @interface GMSURLTileLayer : GMSTileLayer