DHL_AMapLocationOption class

Constructors

DHL_AMapLocationOption({AMapLocationMode locationMode = AMapLocationMode.Hight_Accuracy, bool gpsFirst = false, int httpTimeOut = 10000, int interval = 2000, bool needsAddress = true, bool onceLocation = false, bool onceLocationLatest = false, AMapLocationProtocol locationProtocal = AMapLocationProtocol.HTTP, bool sensorEnable = false, bool wifiScan = true, bool locationCacheEnable = true, bool allowsBackgroundLocationUpdates = false, CLLocationAccuracy desiredAccuracy = CLLocationAccuracy.kCLLocationAccuracyBest, bool locatingWithReGeocode = true, int locationTimeout = 5, bool pausesLocationUpdatesAutomatically = false, int reGeocodeTimeout = 5, bool detectRiskOfFakeLocation = false, double distanceFilter = -1.0, GeoLanguage geoLanguage = GeoLanguage.DEFAULT})

Properties

allowsBackgroundLocationUpdates bool
是否允许后台定位。默认为NO。只在iOS 9.0及之后起作用。设置为YES的时候必须保证 Background Modes 中的 Location updates 处于选中状态,否则会抛出异常。 由于iOS系统限制,需要在定位未开始之前或定位停止之后,修改该属性的值才会有效果。
final
desiredAccuracy CLLocationAccuracy
///////////////////////////////////////////////////////// 以下属性为ios特有 ///////////////////////////////////////////////////////// 设定期望的定位精度。单位米,默认为 kCLLocationAccuracyBest。 定位服务会尽可能去获取满足desiredAccuracy的定位结果,但不保证一定会得到满足期望的结果。 \n注意:设置为kCLLocationAccuracyBest或kCLLocationAccuracyBestForNavigation时, 单次定位会在达到locationTimeout设定的时间后,将时间内获取到的最高精度的定位结果返回。
final
detectRiskOfFakeLocation bool
检测是否存在虚拟定位风险,默认为NO,不检测。 \n注意:设置为YES时,单次定位通过 AMapLocatingCompletionBlock 的 error给出虚拟定位风险提示; 连续定位通过 amapLocationManager:didFailWithError: 方法的 error给出虚拟定位风险提示。 error格式为error.domain==AMapLocationErrorDomain; error.code==AMapLocationErrorRiskOfFakeLocation;
final
distanceFilter double
设定定位的最小更新距离。单位米,默认为 kCLDistanceFilterNone,表示只要检测到设备位置发生变化就会更新位置信息。
final
geoLanguage GeoLanguage
///////////////////////////////////////////////////////// 以下为通用属性 /////////////////////////////////////////////////////////
final
gpsFirst bool
final
hashCode int
The hash code for this object.
no setterinherited
httpTimeOut int
final
interval int
final
locatingWithReGeocode bool
连续定位是否返回逆地理信息,默认YES。
final
locationCacheEnable bool
final
locationMode AMapLocationMode
///////////////////////////////////////////////////////// 以下属性为android特有 /////////////////////////////////////////////////////////
final
locationProtocal AMapLocationProtocol
final
locationTimeout int
指定单次定位超时时间,默认为10s。最小值是2s。 注意单次定位请求前设置。 注意: 单次定位超时时间从确定了定位权限(非kCLAuthorizationStatusNotDetermined状态)后开始计算。
final
needsAddress bool
final
onceLocation bool
final
onceLocationLatest bool
final
pausesLocationUpdatesAutomatically bool
指定定位是否会被系统自动暂停。默认为NO。
final
reGeocodeTimeout int
指定单次定位逆地理超时时间,默认为5s。最小值是2s。注意单次定位请求前设置。
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sensorEnable bool
final
wifiScan bool
final

Methods

getDesiredAccuracy() String
getGeoLanguage() int
getLocationMode() String
getLocationProtocal() String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

kCLDistanceFilterNone double
final