TencentLocation class

一次定位的结果。

映射来源

  • Android TencentLocation
  • iOS TencentLBSLocation
  • Harmony TencentLocation

字段顺序按 common → Android / iOS / Harmony 专属分组。

Constructors

TencentLocation({double? latitude, double? longitude, double? altitude, double? accuracy, double? bearing, double? speed, double? directionFromSensor, int? time, LocationSource source = LocationSource.unknown, CoordinateType coordinateType = CoordinateType.gcj02, TencentGeoAddress? geoAddress, List<TencentPoi> poiList = const [], String? indoorBuildingId, String? indoorBuildingFloor, int? elapsedRealtime, int? gpsRssi, double? verticalAccuracy, String cacheSource = 'none', Map<String, Object?> extras = const {}})
const
TencentLocation.fromMap(Map map)
factory

Properties

accuracy double?
水平精度,单位米。
final
altitude double?
海拔,单位米。仅 GNSS 有效。
final
bearing double?
方向角(course),单位度。仅 GNSS 有效。
final
cacheSource String
缓存来源:'none' / 'sdk' / 'system'
final
coordinateType CoordinateType
坐标系。
final
directionFromSensor double?
传感器方向。仅在 request 的 allowDirectionSensor=true 时有值。
final
elapsedRealtime int?
设备启动后毫秒数。仅 Android 有。
final
extras Map<String, Object?>
原生附加键值对。
final
geoAddress TencentGeoAddress?
逆地理信息。request.requestLevel 达到 name 及以上时有值。
final
gpsRssi int?
GPS 信号强度:0(无) / 1(弱) / 2(中) / 3(强)。仅 Android 有。
final
hashCode int
The hash code for this object.
no setterinherited
indoorBuildingFloor String?
室内楼层。
final
indoorBuildingId String?
室内建筑 ID。
final
latitude double?
纬度。
final
longitude double?
经度。
final
poiList List<TencentPoi>
周边 POI 列表。request.requestLevel == poi 才有。
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source LocationSource
三端分组枚举。用扩展方法 .isGnss / .isNetwork / .isCached 做跨端归类。
final
speed double?
速度,单位 m/s。仅 GNSS 有效。
final
time int?
Unix 时间戳(毫秒)。
final
verticalAccuracy double?
垂直精度,单位米。仅 iOS 有。
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, Object?>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited