# GoogleMaps Framework Reference

# GMSCoordinateBounds

    @interface GMSCoordinateBounds : NSObject

GMSCoordinateBounds represents a rectangular bounding box on the Earth's surface.
GMSCoordinateBounds is immutable and can't be modified after construction.
- `


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


  ` The North-East corner of these bounds.

  #### Declaration

  Swift

      var northEast: CLLocationCoordinate2D { get }

  Objective-C

      @property (nonatomic, readonly) CLLocationCoordinate2D northEast;

- `


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


  ` The South-West corner of these bounds.

  #### Declaration

  Swift

      var southWest: CLLocationCoordinate2D { get }

  Objective-C

      @property (nonatomic, readonly) CLLocationCoordinate2D southWest;

- `


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


  ` Returns NO if this bounds does not contain any points. For example, \[\[GMSCoordinateBounds alloc\]
  init\].valid == NO.

  When an invalid bounds is expanded with valid coordinates via includingCoordinate: or
  includingBounds:, the resulting bounds will be valid but contain only the new coordinates.

  #### Declaration

  Swift

      var isValid: Bool { get }

  Objective-C

      @property (nonatomic, readonly, getter=isValid) BOOL valid;

- `


  ### [-initWithCoordinate:coordinate:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSCoordinateBounds#/c:objc(cs)GMSCoordinateBounds(im)initWithCoordinate:coordinate:)


  ` Inits the northEast and southWest bounds corresponding to the rectangular region defined by the
  two corners.

  It is ambiguous whether the longitude of the box extends from \|coord1\| to \|coord2\| or vice-versa;
  the box is constructed as the smaller of the two variants, eliminating the ambiguity.

  #### Declaration

  Swift

      init(coordinate coord1: CLLocationCoordinate2D, coordinate coord2: CLLocationCoordinate2D)

  Objective-C

      - (nonnull id)initWithCoordinate:(CLLocationCoordinate2D)coord1
                            coordinate:(CLLocationCoordinate2D)coord2;

- `


  ### [-includingCoordinate:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSCoordinateBounds#/c:objc(cs)GMSCoordinateBounds(im)includingCoordinate:)


  ` Returns a GMSCoordinateBounds representing the current bounds extended to include the passed-in
  coordinate.

  If the current bounds is invalid, the result is a valid bounds containing only \|coordinate\|.

  #### Declaration

  Swift

      func includingCoordinate(_ coordinate: CLLocationCoordinate2D) -> GMSCoordinateBounds

  Objective-C

      - (nonnull GMSCoordinateBounds *)includingCoordinate:
          (CLLocationCoordinate2D)coordinate;

- `


  ### [-includingBounds:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSCoordinateBounds#/c:objc(cs)GMSCoordinateBounds(im)includingBounds:)


  ` Returns a GMSCoordinateBounds representing the current bounds extended to include the entire
  other bounds.

  If the current bounds is invalid, the result is a valid bounds equal to \|other\|.

  #### Declaration

  Swift

      func includingBounds(_ other: GMSCoordinateBounds) -> GMSCoordinateBounds

  Objective-C

      - (nonnull GMSCoordinateBounds *)includingBounds:
          (nonnull GMSCoordinateBounds *)other;

- `


  ### [-containsCoordinate:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSCoordinateBounds#/c:objc(cs)GMSCoordinateBounds(im)containsCoordinate:)


  ` Returns YES if \|coordinate\| is contained within this bounds. This includes points that lie
  exactly on the edge of the bounds.

  #### Declaration

  Swift

      func contains(_ coordinate: CLLocationCoordinate2D) -> Bool

  Objective-C

      - (BOOL)containsCoordinate:(CLLocationCoordinate2D)coordinate;

- `


  ### [-intersectsBounds:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSCoordinateBounds#/c:objc(cs)GMSCoordinateBounds(im)intersectsBounds:)


  ` Returns YES if \|other\| overlaps with this bounds. Two bounds are overlapping if there is at least
  one coordinate point contained by both.

  #### Declaration

  Swift

      func intersects(_ other: GMSCoordinateBounds) -> Bool

  Objective-C

      - (BOOL)intersectsBounds:(nonnull GMSCoordinateBounds *)other;

[## GoogleMaps](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSCoordinateBounds#/GoogleMaps)

- `


  ### [-initWithRegion:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSCoordinateBounds#/c:objc(cs)GMSCoordinateBounds(im)initWithRegion:)


  ` Inits with bounds that encompass `region`.

  #### Declaration

  Swift

      init(region: https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Structs/GMSVisibleRegion.html)

  Objective-C

      - (nonnull id)initWithRegion:(https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Structs/GMSVisibleRegion.html)region;

- `


  ### [-initWithPath:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSCoordinateBounds#/c:objc(cs)GMSCoordinateBounds(im)initWithPath:)


  ` Inits with bounds that encompass `path`.

  #### Declaration

  Swift

      init(path: https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPath.html)

  Objective-C

      - (nonnull id)initWithPath:(nonnull https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPath.html *)path;

- `


  ### [-includingPath:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSCoordinateBounds#/c:objc(cs)GMSCoordinateBounds(im)includingPath:)


  ` Returns a `GMSCoordinateBounds` representing the current bounds extended to include `path`.

  #### Declaration

  Swift

      func includingPath(_ path: https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPath.html) -> GMSCoordinateBounds

  Objective-C

      - (nonnull GMSCoordinateBounds *)includingPath:(nonnull https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPath.html *)path;