Stay organized with collections Save and categorize content based on your preferences.
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.
The North-East corner of these bounds.
DeclarationSwift
var northEast: CLLocationCoordinate2D { get }
Objective-C
@property (nonatomic, readonly) CLLocationCoordinate2D northEast;
The South-West corner of these bounds.
DeclarationSwift
var southWest: CLLocationCoordinate2D { get }
Objective-C
@property (nonatomic, readonly) CLLocationCoordinate2D southWest;
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.
DeclarationSwift
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.
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.
DeclarationSwift
init(coordinate coord1: CLLocationCoordinate2D, coordinate coord2: CLLocationCoordinate2D)
Objective-C
- (nonnull id)initWithCoordinate:(CLLocationCoordinate2D)coord1
coordinate:(CLLocationCoordinate2D)coord2;
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|.
DeclarationSwift
func includingCoordinate(_ coordinate: CLLocationCoordinate2D) -> GMSCoordinateBounds
Objective-C
- (nonnull GMSCoordinateBounds *)includingCoordinate:
(CLLocationCoordinate2D)coordinate;
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|.
DeclarationSwift
func includingBounds(_ other: GMSCoordinateBounds) -> GMSCoordinateBounds
Objective-C
- (nonnull GMSCoordinateBounds *)includingBounds:
(nonnull GMSCoordinateBounds *)other;
Returns YES if |coordinate| is contained within this bounds. This includes points that lie exactly on the edge of the bounds.
DeclarationSwift
func contains(_ coordinate: CLLocationCoordinate2D) -> Bool
Objective-C
- (BOOL)containsCoordinate:(CLLocationCoordinate2D)coordinate;
Returns YES if |other| overlaps with this bounds. Two bounds are overlapping if there is at least one coordinate point contained by both.
DeclarationSwift
func intersects(_ other: GMSCoordinateBounds) -> Bool
Objective-C
- (BOOL)intersectsBounds:(nonnull GMSCoordinateBounds *)other;
Inits with bounds that encompass region
.
Inits with bounds that encompass path
.
Objective-C
- (nonnull id)initWithPath:(nonnull GMSPath *)path;
Returns a GMSCoordinateBounds
representing the current bounds extended to include path
.
Swift
func includingPath(_ path: GMSPath) -> GMSCoordinateBounds
Objective-C
- (nonnull GMSCoordinateBounds *)includingPath:(nonnull GMSPath *)path;
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 2024-11-15 UTC.
[[["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."],[[["`GMSCoordinateBounds` represents a rectangular area on the Earth's surface, defined by its north-east and south-west corners."],["It's immutable, meaning it cannot be changed after creation but methods provide ways to create new, extended bounds."],["You can determine if a coordinate or another `GMSCoordinateBounds` is contained within or intersects with the bounds."],["Initializing bounds can be done using two coordinates, a region, or by encompassing a path."],["Invalid bounds are possible, for instance when initialized without coordinates, and specific behaviors are defined for operations involving them."]]],["`GMSCoordinateBounds` defines a rectangular area on Earth's surface, represented by `northEast` and `southWest` corners. Key actions include initializing bounds with two coordinates, a region, or a path. Bounds can be extended to include a coordinate, another bounds, or a path. You can check if bounds are valid or contain a specific coordinate, or if they intersect with another bounds. It is immutable.\n"]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4