Stay organized with collections
Save and categorize content based on your preferences.
GMSOverlay
@interfaceGMSOverlay:NSObject<NSCopying>
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 types
should be created directly (such as GMSMarker, GMSPolyline, and GMSPolygon).
This supports the NSCopying protocol; [overlay_ copy] will return a copy of the overlay type,
but with map set to nil.
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.
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.
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.
Overlay data. You can use this property to associate an arbitrary object with this overlay.
Google Maps SDK for iOS neither reads nor writes this property.
Note that userData should not hold any strong references to any Maps objects, otherwise a retain
cycle may be created (preventing objects from being released).
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-15 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMSOverlay\u003c/code\u003e is an abstract class representing an overlay on a \u003ccode\u003eGMSMapView\u003c/code\u003e and cannot be directly instantiated; use concrete types like \u003ccode\u003eGMSMarker\u003c/code\u003e, \u003ccode\u003eGMSPolyline\u003c/code\u003e, or \u003ccode\u003eGMSPolygon\u003c/code\u003e instead.\u003c/p\u003e\n"],["\u003cp\u003eIt provides properties to manage the overlay's title, map association, tappable status, drawing order (\u003ccode\u003ezIndex\u003c/code\u003e), and custom user data.\u003c/p\u003e\n"],["\u003cp\u003eOverlays with higher \u003ccode\u003ezIndex\u003c/code\u003e values are drawn on top of those with lower values, with markers always drawn above tile layers and non-marker overlays.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003euserData\u003c/code\u003e property allows associating arbitrary data with the overlay, but avoid strong references to prevent retain cycles.\u003c/p\u003e\n"],["\u003cp\u003eCopying an overlay using \u003ccode\u003eNSCopying\u003c/code\u003e creates a new instance with the same properties but dissociated from the map (\u003ccode\u003emap\u003c/code\u003e set to nil).\u003c/p\u003e\n"]]],[],null,["GMSOverlay \n\n @interface GMSOverlay : NSObject \u003cNSCopying\u003e\n\n`GMSOverlay is an abstract class that represents some overlay that may be attached to a specific`\n`GMSMapView. It may not be instantiated directly; instead, instances of concrete overlay types`\nshould be created directly (such as [GMSMarker](../Classes/GMSMarker.html), [GMSPolyline](../Classes/GMSPolyline.html), and [GMSPolygon](../Classes/GMSPolygon.html)).\n\nThis supports the `NSCopying` protocol; \\[overlay_ copy\\] will return a copy of the overlay type,\nbut with `map` set to nil.\n- `\n ``\n ``\n `\n\n [title](#/c:objc(cs)GMSOverlay(py)title)`\n ` \n Title, a short description of the overlay. Some overlays, such as markers, will display the title\n on the map. The title is also the default accessibility text. \n\n Declaration \n Swift \n\n var title: String? { get set }\n\n Objective-C \n\n @property (nonatomic, copy, nullable) NSString *title;\n\n- `\n ``\n ``\n `\n\n [map](#/c:objc(cs)GMSOverlay(py)map)`\n ` \n The map this overlay is on. Setting this property will add the overlay to the map. Setting it to\n nil removes this overlay from the map. An overlay may be active on at most one map at any given\n time. \n\n Declaration \n Swift \n\n weak var map: ../Classes/GMSMapView.html? { get set }\n\n Objective-C \n\n @property (nonatomic, weak, nullable) ../Classes/GMSMapView.html *map;\n\n- `\n ``\n ``\n `\n\n [tappable](#/c:objc(cs)GMSOverlay(py)tappable)`\n ` \n If this overlay should cause tap notifications. Some overlays, such as markers, will default to\n being tappable. \n\n Declaration \n Swift \n\n var isTappable: Bool { get set }\n\n Objective-C \n\n @property (nonatomic, getter=isTappable) BOOL tappable;\n\n- `\n ``\n ``\n `\n\n [zIndex](#/c:objc(cs)GMSOverlay(py)zIndex)`\n ` \n Higher `zIndex` value overlays will be drawn on top of lower `zIndex` value tile layers and\n overlays. Equal values result in undefined draw ordering. Markers are an exception that\n regardless of `zIndex`, they will always be drawn above tile layers and other non-marker\n overlays; they are effectively considered to be in a separate z-index group compared to other\n overlays. \n\n Declaration \n Swift \n\n var zIndex: Int32 { get set }\n\n Objective-C \n\n @property (nonatomic) int zIndex;\n\n- `\n ``\n ``\n `\n\n [userData](#/c:objc(cs)GMSOverlay(py)userData)`\n ` \n Overlay data. You can use this property to associate an arbitrary object with this overlay.\n Google Maps SDK for iOS neither reads nor writes this property.\n\n Note that userData should not hold any strong references to any Maps objects, otherwise a retain\n cycle may be created (preventing objects from being released). \n\n Declaration \n Swift \n\n var userData: Any? { get set }\n\n Objective-C \n\n @property (nonatomic, nullable) id userData;"]]