GMTSLatLng
@interface GMTSLatLng : GMTCImmutableData
Object representing the latitude and longitude.
-
Latitude associated with the object.
Declaration
Swift
var latitude: Double { get }
Objective-C
@property (nonatomic, readonly) double latitude;
-
Longitude associated with the object.
Declaration
Swift
var longitude: Double { get }
Objective-C
@property (nonatomic, readonly) double longitude;
-
Creates and returns an initialized
GMTSLatLng
from givenCLLocationCoordinate2D
.Declaration
Swift
convenience init(from coordinate: CLLocationCoordinate2D)
Objective-C
+ (nonnull instancetype)latLngFromCoordinate:(CLLocationCoordinate2D)coordinate;
-
Initializes the object with the specified
latitude
and `longitude’.Declaration
Swift
init(latitude: Double, longitude: Double)
Objective-C
- (nonnull instancetype)initWithLatitude:(double)latitude longitude:(double)longitude;
-
Unavailable
@remark Use
-initWithLatitude:longitude:
.Declaration
Objective-C
- (nonnull instancetype)init;
-
Creates and returns a
CLLocationCoordinate2D
from currentGMTSLatLng
.Declaration
Swift
func coordinate() -> CLLocationCoordinate2D
Objective-C
- (CLLocationCoordinate2D)coordinate;
-
Gets the lateral distance from the given latlng to the current location.
Declaration
Swift
func distance(fromLocation latlng: GMTSLatLng) -> CLLocationDistance
Objective-C
- (CLLocationDistance)distanceFromLocation:(nonnull GMTSLatLng *)latlng;
-
Indicates if the receiver is almost equal to another given
GMTSLatLng
object based on the constant,GMTSLatLngDegreeAlmostEqualTolerance
.Declaration
Swift
func isAlmostEqual(_ latlng: GMTSLatLng?) -> Bool
Objective-C
- (BOOL)isAlmostEqual:(nullable GMTSLatLng *)latlng;