GooglePlaces Framework Reference

  • GMSPlaceViewportInfo represents an immutable rectangular bounding box on the Earth's surface.

  • It is defined by its north-east and south-west corners, represented by CLLocationCoordinate2D.

  • A GMSPlaceViewportInfo can be considered invalid if it doesn't contain any points, for instance, when it's newly initialized without coordinates.

  • You can create a GMSPlaceViewportInfo by providing its north-east and south-west corner coordinates using the designated initializer.

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