On-demand Rides and Deliveries Solution is currently available only to select partners. Contact sales to learn more.

GMTSLatLng Class Reference


Overview

Object representing the latitude and longitude.

Inherits GMTSImmutableData.

Public Member Functions

(instancetype) - initWithLatitude:longitude:
 Initializes the object with the specified `latitude` and `longitude'.
(CLLocationCoordinate2D) - coordinate
 Creates and returns an CLLocationCoordinate2D from current GMTSLatLng.
(CLLocationDistance) - distanceFromLocation:
 Gets the lateral distance from the given latlng to the current location.
(BOOL) - isAlmostEqual:
 Indicates if the receiver is almost equal to another given GMTSLatLng object based on the constant, GMTSLatLngDegreeAlmostEqualTolerance.

Static Public Member Functions

(instancetype) + latLngFromCoordinate:
 Creates and returns an initialized GMTSLatLng from given CLLocationCoordinate2D.

Properties

double latitude
 Latitude associated with the object.
double longitude
 Longitude associated with the object.

Member Function Documentation

+ (instancetype) latLngFromCoordinate: (CLLocationCoordinate2D)  coordinate

Creates and returns an initialized GMTSLatLng from given CLLocationCoordinate2D.

- (instancetype) initWithLatitude: (double)  latitude
longitude: (double)  longitude 

Initializes the object with the specified `latitude` and `longitude'.

- (CLLocationCoordinate2D) coordinate

Creates and returns an CLLocationCoordinate2D from current GMTSLatLng.

Remarks:
Use
 initWithLatitude:longitude: 
.
- (CLLocationDistance) distanceFromLocation: (GMTSLatLng *)  latlng

Gets the lateral distance from the given latlng to the current location.

- (BOOL) isAlmostEqual: (nullable GMTSLatLng *)  latlng

Indicates if the receiver is almost equal to another given GMTSLatLng object based on the constant, GMTSLatLngDegreeAlmostEqualTolerance.


Property Documentation

- (double) latitude [read, assign]

Latitude associated with the object.

- (double) longitude [read, assign]

Longitude associated with the object.