DHL_AMapLocationOption constructor

DHL_AMapLocationOption({
  1. AMapLocationMode locationMode = AMapLocationMode.Hight_Accuracy,
  2. bool gpsFirst = false,
  3. int httpTimeOut = 10000,
  4. int interval = 2000,
  5. bool needsAddress = true,
  6. bool onceLocation = false,
  7. bool onceLocationLatest = false,
  8. AMapLocationProtocol locationProtocal = AMapLocationProtocol.HTTP,
  9. bool sensorEnable = false,
  10. bool wifiScan = true,
  11. bool locationCacheEnable = true,
  12. bool allowsBackgroundLocationUpdates = false,
  13. CLLocationAccuracy desiredAccuracy = CLLocationAccuracy.kCLLocationAccuracyBest,
  14. bool locatingWithReGeocode = true,
  15. int locationTimeout = 5,
  16. bool pausesLocationUpdatesAutomatically = false,
  17. int reGeocodeTimeout = 5,
  18. bool detectRiskOfFakeLocation = false,
  19. double distanceFilter = -1.0,
  20. 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,
});