AMapLocationOption class

定位参数设置 用于配置高德定位SDK的各项参数

Constructors

AMapLocationOption.new({int locationInterval = 2000, bool needAddress = true, bool locatingWithReGeocode = false, AMapLocationMode locationMode = AMapLocationMode.Hight_Accuracy, GeoLanguage geoLanguage = GeoLanguage.DEFAULT, bool onceLocation = false, bool pausesLocationUpdatesAutomatically = false, DesiredAccuracy desiredAccuracy = DesiredAccuracy.Best, double distanceFilter = -1, AMapLocationAccuracyAuthorizationMode desiredLocationAccuracyAuthorizationMode = AMapLocationAccuracyAuthorizationMode.FullAccuracy})
构造函数 创建定位参数对象,可以设置各种定位参数

Properties

allowsBackgroundLocationUpdates bool
是否允许后台定位更新
getter/setter pair
desiredAccuracy DesiredAccuracy
iOS端期望的定位精度,只在iOS端有效 默认值:最高精度 可选值: DesiredAccuracy.Best 最高精度 DesiredAccuracy.BestForNavigation 适用于导航场景的高精度 DesiredAccuracy.NearestTenMeters 10米 DesiredAccuracy.Kilometer 1000米 DesiredAccuracy.ThreeKilometers 3000米
getter/setter pair
desiredLocationAccuracyAuthorizationMode AMapLocationAccuracyAuthorizationMode
iOS 14中设置期望的定位精度权限 控制请求的定位精度权限类型
getter/setter pair
distanceFilter double
iOS端定位最小更新距离 单位:米 默认值:-1,不做限制 设置为正数时,只有移动距离超过这个值才会更新位置
getter/setter pair
fullAccuracyPurposeKey String
iOS 14中定位精度权限由模糊定位升级到精确定位时,需要用到的场景key fullAccuracyPurposeKey 这个key要和plist中的配置一样
getter/setter pair
geoLanguage GeoLanguage
逆地理信息语言类型 默认GeoLanguage.DEFAULT 自动适配 可选值: GeoLanguage.DEFAULT 自动适配 GeoLanguage.EN 英文 GeoLanguage.ZH 中文
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
locatingWithReGeocode bool
是否需要开启locatingWithReGeocode 设置为true时会进行逆地理编码,获取地址信息
getter/setter pair
locationInterval int
Android端定位间隔 单位:毫秒 默认:2000毫秒 只在连续定位模式下有效
getter/setter pair
locationMode AMapLocationMode
Android端定位模式, 只在Android系统上有效 默认值:AMapLocationMode.Hight_Accuracy 可选值: AMapLocationMode.Battery_Saving 低功耗模式 AMapLocationMode.Device_Sensors 仅设备模式 AMapLocationMode.Hight_Accuracy 高精度模式
getter/setter pair
needAddress bool
是否需要地址信息,默认true 设置为true时会返回地址信息,false则不返回
getter/setter pair
onceLocation bool
是否单次定位 默认值:false(连续定位) 设置为true时只定位一次,false为连续定位
getter/setter pair
pausesLocationUpdatesAutomatically bool
iOS端是否允许系统暂停定位 默认:false 设置为true时,当APP进入后台时,定位会被系统暂停
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getOptionsMap() Map
获取设置的定位参数对应的Map 将所有参数转换为Map格式,用于传递给原生平台 返回:包含所有定位参数的Map对象
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