GooglePlaces Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMSPlaceViewportInfo
@interface GMSPlaceViewportInfo : NSObject
GMSPlaceViewportInfo
represents a rectangular bounding box on the Earth’s surface.
GMSPlaceViewportInfo
is immutable and can’t be modified after construction.
-
The North-East corner of these bounds.
Declaration
Swift
var northEast: CLLocationCoordinate2D { get }
Objective-C
@property (nonatomic, readonly) CLLocationCoordinate2D northEast;
-
The South-West corner of these bounds.
Declaration
Swift
var southWest: CLLocationCoordinate2D { get }
Objective-C
@property (nonatomic, readonly) CLLocationCoordinate2D southWest;
-
Returns NO if this bounds does not contain any points. For example, [[GMSPlaceViewportInfo alloc]
init].valid == NO.
Declaration
Swift
var isValid: Bool { get }
Objective-C
@property (nonatomic, readonly, getter=isValid) BOOL valid;
-
Inits the northEast and southWest bounds corresponding to the rectangular region defined by the
two corners.
Declaration
Swift
init!(northEast: CLLocationCoordinate2D, southWest: CLLocationCoordinate2D)
Objective-C
- (id)initWithNorthEast:(CLLocationCoordinate2D)northEast
southWest:(CLLocationCoordinate2D)southWest;
Parameters
northEast
|
The North-East corner of these bounds.
|
southWest
|
The South-West corner of these bounds
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMSPlaceViewportInfo\u003c/code\u003e represents an immutable rectangular bounding box on the Earth's surface.\u003c/p\u003e\n"],["\u003cp\u003eIt is defined by its north-east and south-west corners, represented by \u003ccode\u003eCLLocationCoordinate2D\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003eGMSPlaceViewportInfo\u003c/code\u003e can be considered invalid if it doesn't contain any points, for instance, when it's newly initialized without coordinates.\u003c/p\u003e\n"],["\u003cp\u003eYou can create a \u003ccode\u003eGMSPlaceViewportInfo\u003c/code\u003e by providing its north-east and south-west corner coordinates using the designated initializer.\u003c/p\u003e\n"]]],[],null,["# GooglePlaces Framework Reference\n\nGMSPlaceViewportInfo\n====================\n\n @interface GMSPlaceViewportInfo : NSObject\n\n`GMSPlaceViewportInfo` represents a rectangular bounding box on the Earth's surface.\n`GMSPlaceViewportInfo` is immutable and can't be modified after construction.\n- `\n ``\n ``\n `\n\n ### [northEast](#/c:objc(cs)GMSPlaceViewportInfo(py)northEast)\n\n `\n ` \n The North-East corner of these bounds. \n\n #### Declaration\n\n Swift \n\n var northEast: CLLocationCoordinate2D { get }\n\n Objective-C \n\n @property (nonatomic, readonly) CLLocationCoordinate2D northEast;\n\n- `\n ``\n ``\n `\n\n ### [southWest](#/c:objc(cs)GMSPlaceViewportInfo(py)southWest)\n\n `\n ` \n The South-West corner of these bounds. \n\n #### Declaration\n\n Swift \n\n var southWest: CLLocationCoordinate2D { get }\n\n Objective-C \n\n @property (nonatomic, readonly) CLLocationCoordinate2D southWest;\n\n- `\n ``\n ``\n `\n\n ### [valid](#/c:objc(cs)GMSPlaceViewportInfo(py)valid)\n\n `\n ` \n Returns NO if this bounds does not contain any points. For example, \\[\\[GMSPlaceViewportInfo alloc\\]\n init\\].valid == NO. \n\n #### Declaration\n\n Swift \n\n var isValid: Bool { get }\n\n Objective-C \n\n @property (nonatomic, readonly, getter=isValid) BOOL valid;\n\n- `\n ``\n ``\n `\n\n ### [-initWithNorthEast:southWest:](#/c:objc(cs)GMSPlaceViewportInfo(im)initWithNorthEast:southWest:)\n\n `\n ` \n Inits the northEast and southWest bounds corresponding to the rectangular region defined by the\n two corners. \n\n #### Declaration\n\n Swift \n\n init!(northEast: CLLocationCoordinate2D, southWest: CLLocationCoordinate2D)\n\n Objective-C \n\n - (id)initWithNorthEast:(CLLocationCoordinate2D)northEast\n southWest:(CLLocationCoordinate2D)southWest;\n\n #### Parameters\n\n |-------------------|----------------------------------------|\n | ` `*northEast*` ` | The North-East corner of these bounds. |\n | ` `*southWest*` ` | The South-West corner of these bounds |"]]