PositionOhos class

Location information. 位置信息。 参考链接:https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-location-kit/js-apis-geoLocationManager.md#location

Inheritance

Constructors

PositionOhos.new({required double longitude, required double latitude, required DateTime timestamp, required double accuracy, required double altitude, required double speed, double direction = 0.0, int timeSinceBoot = 0, List<String>? additions, int? additionSize})
const
PositionOhos.fromString(String message)
Converts the supplied String to an instance of the PositionOhos class.
factory

Properties

accuracy double
The estimated horizontal accuracy of the position in meters.
finalinherited
additions List<String>?
附加信息。 Additional information.
final
additionSize int?
附加信息数量。取值范围为大于等于0。 Number of additional information. The value range is greater than or equal to 0.
final
altitude double
The altitude of the device in meters.
finalinherited
altitudeAccuracy double
The estimated vertical accuracy of the position in meters.
finalinherited
direction double
表示航向信息。单位是“度”,取值范围为0到360。 Indicates the direction information in degrees, with a value range from 0 to 360.
final
floor int?
The floor specifies the floor of the building on which the device is located.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
heading double
The heading in which the device is traveling in degrees.
finalinherited
headingAccuracy double
The estimated heading accuracy of the position in degrees.
finalinherited
isMocked bool
Will be true on Android (starting from API lvl 18) when the location came from the mocked provider.
finalinherited
latitude double
The latitude of this position in degrees normalized to the interval -90.0 to +90.0 (both inclusive).
finalinherited
longitude double
The longitude of the position in degrees normalized to the interval -180 (exclusive) to +180 (inclusive).
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
speed double
The speed at which the devices is traveling in meters per second over ground.
finalinherited
speedAccuracy double
The estimated speed accuracy of this position, in meters per second.
finalinherited
timeSinceBoot int
表示位置时间戳,开机时间格式。 Indicates the location timestamp in the format of boot time.
final
timestamp DateTime
The time at which this position was determined.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the Position instance into a Map instance that can be serialized to JSON.
override
toString() String
A string representation of this object.
inherited

Operators

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