AMapLocationOption class

定位参数设置

Constructors

AMapLocationOption({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

desiredAccuracy DesiredAccuracy
iOS端期望的定位精度, 只在iOS端有效
默认值:最高精度
可选值:
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 自动适配
可选值:
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
locatingWithReGeocode bool
是否需要开启locatingWithReGeocode
getter/setter pair
locationInterval int
Android端定位间隔
单位:毫秒
默认:2000毫秒
getter/setter pair
locationMode AMapLocationMode
Android端定位模式, 只在Android系统上有效
默认值:AMapLocationMode.Hight_Accuracy
可选值:
getter/setter pair
needAddress bool
是否需要地址信息,默认true
getter/setter pair
onceLocation bool
是否单次定位 默认值:false
getter/setter pair
pausesLocationUpdatesAutomatically bool
iOS端是否允许系统暂停定位
默认:false
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getOptionsMap() 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