DHL_AMapLocationOption constructor
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,
Implementation
DHL_AMapLocationOption({
this.locationMode: AMapLocationMode.Hight_Accuracy,
this.gpsFirst: false,
this.httpTimeOut: 10000, //30有点长,特殊情况才需要这么长,改成10
this.interval: 2000,
this.needsAddress: true,
this.onceLocation: false,
this.onceLocationLatest: false,
this.locationProtocal: AMapLocationProtocol.HTTP,
this.sensorEnable: false,
this.wifiScan: true,
this.locationCacheEnable: true,
this.allowsBackgroundLocationUpdates: false,
this.desiredAccuracy:
CLLocationAccuracy.kCLLocationAccuracyBest, //精度越高,时间越久
this.locatingWithReGeocode: true,
this.locationTimeout: 5, //注意这里的单位为秒
this.pausesLocationUpdatesAutomatically: false,
this.reGeocodeTimeout: 5, //注意ios的时间单位是秒
this.detectRiskOfFakeLocation: false,
this.distanceFilter: -1.0,
this.geoLanguage: GeoLanguage.DEFAULT,
});