LocationClientOptions constructor
LocationClientOptions({
- bool isMockEnable = true,
- num interval = 2000,
- bool isOnceLocation = false,
- bool isNeedAddress = true,
- bool isWifiScan = true,
- LocationMode locationMode = LocationMode.Battery_Saving,
- LocationProtocol locationProtocol = LocationProtocol.HTTP,
- bool isKillProcess = false,
- bool isGpsFirst = false,
- num httpTimeOut = 30000,
- bool isOffset = true,
- bool isLocationCacheEnable = true,
- bool isOnceLocationLatest = false,
- bool isSensorEnable = false,
- num lastLocationLifeCycle = 30000,
- GeoLanguage geoLanguage = GeoLanguage.ZH,
- bool? isDownloadCoordinateConvertLibrary,
- num deviceModeDistanceFilter = 0.0,
- AMapLocationPurpose? locationPurpose,
- bool isOpenAlwaysScanWifi = true,
- num scanWifiInterval = 30000,
- num distanceFilter = 0,
- bool pausesLocationUpdatesAutomatically = false,
- bool allowsBackgroundLocationUpdates = false,
- num locationTimeout = 3000,
- num reGeocodeTimeout = 3000,
- bool locatingWithReGeocode = false,
- Set? monitoredRegions,
- bool detectRiskOfFakeLocation = false,
Implementation
LocationClientOptions({
this.isMockEnable = true,
this.interval = 2000,
this.isOnceLocation = false,
this.isNeedAddress = true,
this.isWifiScan = true,
this.locationMode = LocationMode.Battery_Saving,
this.locationProtocol = LocationProtocol.HTTP,
this.isKillProcess = false,
this.isGpsFirst = false,
this.httpTimeOut = 30000,
this.isOffset = true,
this.isLocationCacheEnable = true,
this.isOnceLocationLatest = false,
this.isSensorEnable = false,
this.lastLocationLifeCycle = 30000,
this.geoLanguage = GeoLanguage.ZH,
this.isDownloadCoordinateConvertLibrary,
this.deviceModeDistanceFilter = 0.0,
this.locationPurpose, // 可以为空
this.isOpenAlwaysScanWifi = true,
this.scanWifiInterval = 30000,
this.distanceFilter = 0,
this.pausesLocationUpdatesAutomatically = false,
this.allowsBackgroundLocationUpdates = false,
this.locationTimeout = 3000,
this.reGeocodeTimeout = 3000,
this.locatingWithReGeocode = false,
this.monitoredRegions,
this.detectRiskOfFakeLocation = false,
});