GMTSLatLng 类参考


概览

表示纬度和经度的对象。

继承 GMTCImmutableData

公共成员函数

(instancetype)- initWithLatitude:longitude:
 使用指定的“latitude”和“longitude”初始化对象。
(CLLocationCoordinate2D)- 坐标
 根据当前的 GMTSLatLng 创建并返回 CLLocationCoordinate2D。
(CLLocationDistance)- distanceFromLocation
 获取从指定 latlng 到当前位置的横向距离。
(BOOL) - isAlmostEqual
 指示接收器是否几乎等于基于常量 GMTSLatLngDegreeAlmostEqualTolerance 的另一个给定 GMTSLatLng 对象。

静态公共成员函数

(instancetype)+ latLngFromCoordinate
 根据指定的 CLLocationCoordinate2D 创建并返回初始化的 GMTSLatLng

属性

双精度latitude
 与对象关联的纬度。
双精度longitude
 与对象相关联的经度。

成员函数文档

+ (instancetype) latLngFromCoordinate (CLLocationCoordinate2D) 坐标

根据指定的 CLLocationCoordinate2D 创建并返回初始化的 GMTSLatLng

- (instancetype) initWithLatitude: (双精度) latitude
longitude: (双精度) longitude

使用指定的“latitude”和“longitude”初始化对象。

- (CLLocationCoordinate2D)坐标

根据当前的 GMTSLatLng 创建并返回 CLLocationCoordinate2D。

备注
适用病症
 initWithLatitude:longitude: 
- (CLLocationDistance) distanceFromLocation (GMTSLatLng *) latlng

获取从指定 latlng 到当前位置的横向距离。

- (BOOL) isAlmostEqual (可为 null 的 GMTSLatLng *) latlng

指示接收器是否几乎等于基于常量 GMTSLatLngDegreeAlmostEqualTolerance 的另一个给定 GMTSLatLng 对象。


属性说明

-(双精度)latitude [read, assign]

与对象关联的纬度。

-(双精度)longitude [read, assign]

与对象相关联的经度。