LocationSource enum
定位结果的来源。
设计原则:诚实分组 + 扩展方法。枚举值按平台 前缀分组,同时提供跨端归类的扩展方法 —— 用户想精确控制用枚举值, 想通用判断用 LocationSourceX。
映射来源:
- Android:
TencentLocation的*_PROVIDER字符串常量(GPS/NETWORK/CELL/WIFI/ CACHE/BEIDOU/RTK/SINGLE/COARSE/FUSED);其他映射为 unknown - iOS:
TencentLBSLocationProvider { GPS=0, NetWork=1, Simulated=2, AccessoryGPS=3, AccessoryNetwork=4 } - Harmony:
TencentLocationConstant.LocationSource { GNSS=1, NETWORK=2, INDOOR=3, RTK=4 }
- Inheritance
- Available extensions
Values
- unknown → const LocationSource
-
未知 / 未提供。所有平台通用。
- androidGps → const LocationSource
-
Android
GPS_PROVIDER("gps")。 - androidNetwork → const LocationSource
-
Android
NETWORK_PROVIDER("network")。 - androidCell → const LocationSource
-
Android
CELL_PROVIDER("cell")。 - androidWifi → const LocationSource
-
Android
WIFI_PROVIDER("wifi")。 - androidCache → const LocationSource
-
Android
CACHE_PROVIDER("cache")。 - androidBeidou → const LocationSource
-
Android
BEIDOU_PROVIDER("beidou")。 - androidRtk → const LocationSource
-
Android
RTK_PROVIDER("rtk")。 - androidSingle → const LocationSource
-
Android
SINGLE_PROVIDER("single")。 - androidCoarse → const LocationSource
-
Android
COARSE_PROVIDER("coarse")。 - androidFused → const LocationSource
-
Android
FUSED_PROVIDER("fused")。 - iosGps → const LocationSource
-
iOS
TencentLBSLocationProviderGPS。 - iosNetwork → const LocationSource
-
iOS
TencentLBSLocationProviderNetWork。 - iosSimulated → const LocationSource
-
iOS
TencentLBSLocationProviderSimulated。 - iosAccessoryGps → const LocationSource
-
iOS
TencentLBSLocationProviderAccessoryGPS(外设 GPS)。 - iosAccessoryNetwork → const LocationSource
-
iOS
TencentLBSLocationProviderAccessoryNetwork(外设网络)。 - harmonyGnss → const LocationSource
-
Harmony
LocationSource.GNSS。 - harmonyNetwork → const LocationSource
-
Harmony
LocationSource.NETWORK。 - harmonyIndoor → const LocationSource
-
Harmony
LocationSource.INDOOR。 - harmonyRtk → const LocationSource
-
Harmony
LocationSource.RTK。
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- isCached → bool
-
Available on LocationSource, provided by the LocationSourceX extension
是否为缓存定位来源。no setter - isFused → bool
-
Available on LocationSource, provided by the LocationSourceX extension
是否为融合定位(仅 Android 原生有此枚举值)。no setter - isGnss → bool
-
Available on LocationSource, provided by the LocationSourceX extension
是否为任一端的卫星定位来源(GPS / 北斗 / RTK / GNSS)。no setter - isIndoor → bool
-
Available on LocationSource, provided by the LocationSourceX extension
是否为室内高精度定位(仅 Harmony 原生有此枚举值)。no setter - isNetwork → bool
-
Available on LocationSource, provided by the LocationSourceX extension
是否为任一端的网络定位来源(Wi-Fi / 基站 / Network)。no setter - name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- wireName → String
-
Available on LocationSource, provided by the LocationSourceX extension
给 channel 的字符串名。no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
LocationSource> - A constant List of the values in this enum, in order of their declaration.