AI-generated Key Takeaways
- 
          The Google Maps SDK for iOS provides classes for map display, interaction, and customization within iOS apps. 
- 
          Core map and navigation classes like GMSMapView,GMSNavigationSession, andGMSNavigatorenable displaying maps, managing navigation sessions, and controlling navigation routes.
- 
          Map objects and utilities such as GMSMarker,GMSPolygon, andGMSCircleallow developers to add and manipulate various elements on the map.
- 
          The SDK offers advanced features like location simulation ( GMSLocationSimulator), road snapping (GMSRoadSnappedLocationProvider), and indoor building display (GMSIndoorDisplay).
- 
          Developers can customize map appearance with styles ( GMSMapStyle), camera settings (GMSCameraPosition), and UI settings (GMSUISettings).
Classes
The following classes are available globally.
- 
                  
                  A class you can use to simulate a device location for testing purposes. DeclarationSwift class GMSLocationSimulator : NSObjectObjective-C @interface GMSLocationSimulator : 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 controller that manages and displays a directions list. The controller maintains its own states internally based on the associated navigator. ThedirectionsListViewis updated automatically based onnavigatorstates.DeclarationSwift class GMSNavigationDirectionsListController : NSObjectObjective-C @interface GMSNavigationDirectionsListController : NSObject
- 
                  
                  Options for formatting attributed instruction strings. DeclarationSwift class GMSNavigationInstructionOptions : NSObjectObjective-C @interface GMSNavigationInstructionOptions : NSObject
- 
                  
                  Information about a single lane during navigation. DeclarationSwift class GMSNavigationLane : NSObjectObjective-C @interface GMSNavigationLane : NSObject
- 
                  
                  Information about a single lane direction during navigation. DeclarationSwift class GMSNavigationLaneDirection : NSObjectObjective-C @interface GMSNavigationLaneDirection : NSObject
- 
                  
                  A class contains information for license plate restriction. It maintains the state of vehicle’s license plate information and restriction. DeclarationSwift class GMSNavigationLicensePlateRestriction : NSObjectObjective-C @interface GMSNavigationLicensePlateRestriction : NSObject
- 
                  
                  Contains information about the state of navigation DeclarationSwift class GMSNavigationNavInfo : NSObjectObjective-C @interface GMSNavigationNavInfo : NSObject
- 
                  
                  An immutable class that encapsulates ETA and distance information for both the default best route, and the shortest route, to a specific waypoint. DeclarationSwift class GMSNavigationRouteInfo : NSObjectObjective-C @interface GMSNavigationRouteInfo : NSObject
- 
                  
                  An immutable class that contains options related to routing logic (e.g., routing strategy). DeclarationSwift class GMSNavigationRoutingOptions : NSObject, NSCopying, NSMutableCopyingObjective-C @interface GMSNavigationRoutingOptions : NSObject <NSCopying, NSMutableCopying>
- 
                  
                  A mutable class that contains options related to routing logic (e.g., routing strategy). DeclarationSwift class GMSNavigationMutableRoutingOptions : GMSNavigationRoutingOptionsObjective-C @interface GMSNavigationMutableRoutingOptions : GMSNavigationRoutingOptions
- 
                  
                  Services enabling control of mobile access to the Google Maps Navigation SDK for iOS. DeclarationSwift class GMSNavigationServices : NSObjectObjective-C @interface GMSNavigationServices : NSObject
- 
                  
                  This class provides a set of related objects that can be used to programmatically control a navigation session. DeclarationSwift class GMSNavigationSession : NSObjectObjective-C @interface GMSNavigationSession : NSObject
- 
                  
                  An immutable class that defines triggering thresholds for different severities of speed alerts, represented by GMSNavigationSpeedAlertSeverity.You can use this to customize the speed alert triggering thresholds in percentage for both minor and major alerts, and customize the time based triggering threshold for major speed alert. The speed alerts triggered by corresponding thresholds from this GMSNavigationSpeedAlertOptionshave UI customized inGMSNavigationSpeedometerUIOptionsif set.DeclarationSwift class GMSNavigationSpeedAlertOptions : NSObject, NSCopying, NSMutableCopyingObjective-C @interface GMSNavigationSpeedAlertOptions : NSObject <NSCopying, NSMutableCopying>
- 
                  
                  A mutable class that defines triggering thresholds for different severities of speed alerts, represented by GMSNavigationSpeedAlertSeverity.DeclarationSwift class GMSNavigationMutableSpeedAlertOptions : GMSNavigationSpeedAlertOptionsObjective-C @interface GMSNavigationMutableSpeedAlertOptions : GMSNavigationSpeedAlertOptions
- 
                  
                  An immutable class that encapsulates UI configuration for different severities of speed alerts, represented by GMSNavigationSpeedAlertSeverity.You can use this class to customize the speed alert UI, such as the colors of the font and icon background of minor and major speed alert. You use GMSNavigationSpeedometerUIOptionsto customize the speed alert UI for different severities. You must useGMSNavigationSpeedAlertOptionsto define the triggering thresholds for each severity of speed alert.DeclarationSwift class GMSNavigationSpeedometerUIOptions : NSObject, NSCopying, NSMutableCopyingObjective-C @interface GMSNavigationSpeedometerUIOptions : NSObject <NSCopying, NSMutableCopying>
- 
                  
                  The mutable class that encapsulates UI configuration for different severities of speed alerts, represented by GMSNavigationSpeedAlertSeverity.DeclarationSwift class GMSNavigationMutableSpeedometerUIOptions : GMSNavigationSpeedometerUIOptionsObjective-C @interface GMSNavigationMutableSpeedometerUIOptions : GMSNavigationSpeedometerUIOptions
- 
                  
                  Information about a single step along a navigation route. DeclarationSwift class GMSNavigationStepInfo : NSObjectObjective-C @interface GMSNavigationStepInfo : NSObject
- 
                  
                  DeclarationSwift class GMSNavigationStepInfoImageOptions : NSObjectObjective-C @interface GMSNavigationStepInfoImageOptions : NSObject /** * The object which provides screen metrics for the screen the image will be displayed on. In most * cases, developers can pass the instance of UIScreen for the screen where the image will be * displayed. This property defaults to UIScreen.mainScreen. */ @property(nonatomic, nullable) id<GMSNavigationScreenMetrics> screenMetrics; /** * The image size for maneuverImage in `GMSNavigationStepInfo`. * Defaults to `GMSNavigationManeuverImageSizeSquare96`. */ @property(nonatomic) GMSNavigationManeuverImageSize maneuverImageSize; - (instancetype)init NS_DESIGNATED_INITIALIZER; @end
- 
                  
                  Options for displaying terms and conditions. DeclarationSwift class GMSNavigationTermsAndConditionsOptions : NSObject, NSCopyingObjective-C @interface GMSNavigationTermsAndConditionsOptions : NSObject <NSCopying>
- 
                  
                  Parameters that describe the look and feel of the dialog. DeclarationSwift class GMSNavigationTermsDialogUIParams : NSObjectObjective-C @interface GMSNavigationTermsDialogUIParams : NSObject
- 
                  
                  An immutable class that encapsulates the distance remaining and the ETA for a route. DeclarationSwift class GMSNavigationTimeAndDistance : NSObjectObjective-C @interface GMSNavigationTimeAndDistance : NSObject
- 
                  
                  Contains methods for recording transactions. This class should only be used if you are a Mobility Services customer and are billed by Google on a per-transaction basis. DeclarationSwift class GMSNavigationTransactionRecorder : NSObjectObjective-C @interface GMSNavigationTransactionRecorder : NSObject
- 
                  
                  An immutable waypoint class, used to specify navigation destinations. It may be initialized from a CLLocationCoordinate2Dor a Google Place ID.DeclarationSwift class GMSNavigationWaypoint : NSObject, NSCopying, NSMutableCopyingObjective-C @interface GMSNavigationWaypoint : NSObject <NSCopying, NSMutableCopying>
- 
                  
                  A mutable waypoint class. DeclarationSwift class GMSNavigationMutableWaypoint : GMSNavigationWaypointObjective-C @interface GMSNavigationMutableWaypoint : GMSNavigationWaypoint
- 
                  
                  This is the main class of the Google Navigation SDK for iOS and provides methods for controlling navigation to a destination and accessing route and progress information. This class does not support subclassing. This class is not thread-safe. All methods must be called from the main thread. DeclarationSwift class GMSNavigator : NSObjectObjective-C @interface GMSNavigator : NSObject
- 
                  
                  Provides updates of the device’s location. This class functions similarly to CLLocationManager, except that if the device is in driving mode, the location updates is snapped to the nearest road. This class is not intended for subclassing. DeclarationSwift class GMSRoadSnappedLocationProvider : NSObjectObjective-C @interface GMSRoadSnappedLocationProvider : NSObject
- 
                  
                  An immutable class which represents a single leg of a journey, either from the device’s current position to the first destination, or from one destination to a subsequent destination. DeclarationSwift class GMSRouteLeg : NSObjectObjective-C @interface GMSRouteLeg : NSObject
- 
                  
                  Settings for the user interface of a GMSMapView. DeclarationSwift class GMSUISettings : NSObjectObjective-C @interface GMSUISettings : NSObject
- 
                  
                  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
- 
                  
                  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
- 
                  
                  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