# GoogleMaps Framework Reference

# GMSOverlay

    @interface GMSOverlay : NSObject <NSCopying>

`GMSOverlay is an abstract class that represents some overlay that may be attached to a specific`
`GMSMapView. It may not be instantiated directly; instead, instances of concrete overlay types`
should be created directly (such as `https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSMarker.html`, `https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPolyline.html`, and `https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPolygon.html`).

This supports the `NSCopying` protocol; \[overlay_ copy\] will return a copy of the overlay type,
but with `map` set to nil.
- `


  ### [title](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSOverlay#/c:objc(cs)GMSOverlay(py)title)


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

  #### Declaration

  Swift

      var title: String? { get set }

  Objective-C

      @property (nonatomic, copy, nullable) NSString *title;

- `


  ### [map](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSOverlay#/c:objc(cs)GMSOverlay(py)map)


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

  #### Declaration

  Swift

      weak var map: https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSMapView.html? { get set }

  Objective-C

      @property (nonatomic, weak, nullable) https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSMapView.html *map;

- `


  ### [tappable](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSOverlay#/c:objc(cs)GMSOverlay(py)tappable)


  ` If this overlay should cause tap notifications. Some overlays, such as markers, will default to
  being tappable.

  #### Declaration

  Swift

      var isTappable: Bool { get set }

  Objective-C

      @property (nonatomic, getter=isTappable) BOOL tappable;

- `


  ### [zIndex](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSOverlay#/c:objc(cs)GMSOverlay(py)zIndex)


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

  #### Declaration

  Swift

      var zIndex: Int32 { get set }

  Objective-C

      @property (nonatomic) int zIndex;

- `


  ### [userData](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSOverlay#/c:objc(cs)GMSOverlay(py)userData)


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

  #### Declaration

  Swift

      var userData: Any? { get set }

  Objective-C

      @property (nonatomic, nullable) id userData;