04 地图组件 - MiEcosystem/miot-plugin-sdk GitHub Wiki
地图的 js 桥接,内部使用高德地图实现,
Export: public
Doc_name: 地图组件
Doc_index: 4
Doc_directory: ui
Mark: andr done
-
miot/ui/AMapView
-
~showsUserLocation :
bool
-
~trafficEnabled :
bool
-
~showsScale :
bool
-
~showsCompass :
bool
-
~zoomEnabled :
bool
-
~pausesLocationUpdatesAutomatically :
bool
-
~allowsBackgroundLocationUpdates :
bool
-
~desiredAccuracy :
number
-
~distanceFilter :
number
-
~scaleOrigin :
object
-
~mapType :
number
-
~headingFilter :
number
-
~zoomLevel :
number
-
~centerCoordinate :
object
-
~userTrackingMode :
string
-
~compassOrigin :
object
~userLocation :object
-
~language :
number
-
~logoPosition :
number
-
~userLocationRepresentation :
object
-
~annotations :
array
-
~circles :
array
-
~polylines :
array
-
~multiPolylines :
array
-
~onUpdateUserLocation :
func
-
~onSingleTappedAtCoordinate :
func
-
~onSelectAnnotationView :
func
-
~onMapWillZoomByUser :
func
-
~onMapDidZoomByUser :
func
-
~showsUserLocation :
是否显示用户位置
Kind: inner property of miot/ui/AMapView
是否显示交通状况
Kind: inner property of miot/ui/AMapView
是否显示坐标尺
Kind: inner property of miot/ui/AMapView
是否显示指南针
Kind: inner property of miot/ui/AMapView
是否允许用户缩放
Kind: inner property of miot/ui/AMapView
是否自动暂停位置更新,海外服务器不支持
Kind: inner property of miot/ui/AMapView
允许后台更新位置信息,海外服务器不支持
Kind: inner property of miot/ui/AMapView
定位精度,海外服务器不支持
Kind: inner property of miot/ui/AMapView
设定定位的最小更新距离,即移动多远会提示移动,海外服务器不支持
Kind: inner property of miot/ui/AMapView
比例尺原点位置,海外服务器不支持
格式:{'x':number, 'y':number}
Kind: inner property of miot/ui/AMapView
地图类型
0< 普通地图 1< 卫星地图
Kind: inner property of miot/ui/AMapView
设定最小更新角度。默认为1度。海外服务器不支持
Kind: inner property of miot/ui/AMapView
缩放级别, [3, 20]
Kind: inner property of miot/ui/AMapView
中心点坐标
格式:{latitude: number, longitude: number}
Kind: inner property of miot/ui/AMapView
定位用户位置的模式
none < 不追踪用户的location更新
follow < 追踪用户的location更新
followWithHeading < 追踪用户的location与heading更新
Kind: inner property of miot/ui/AMapView
罗盘原点位置,海外服务器不支持
格式:{'x':number, 'y':number}
Kind: inner property of miot/ui/AMapView
Deprecated
用户定位,native未实现,待废弃
Kind: inner property of miot/ui/AMapView
地图语言的支持, 目前仅支持中英文, 默认中文,,海外服务器不支持,语言会根据系统语言自动设置 0: 表示中文; 1: 表示英文
Kind: inner property of miot/ui/AMapView
地图logo的显示位置, 默认左边底部,海外服务器不支持 0: 左边底部; 1:中间底部; 2:右边底部;
Kind: inner property of miot/ui/AMapView
用户位置显示样式控制,海外服务器不支持
格式:{'image':'imagePath', 'imageScale': number, 'showsAccuracyRing':boolean, 'showsHeadingIndicator': boolean, 'lineWidth':number, 'fillColor': color, 'strokeColor': color, 'lineDashPattern':[]}
Kind: inner property of miot/ui/AMapView
标记点数组,海外服务器不支持 格式:[{'coordinate':{latitude: number, longitude: number}, 'title':'aaa', 'subtitle':'', 'id':'', 'image':'imagePath', 'canShowCallout': true}] canShowCallout 是否点击后显示title
Kind: inner property of miot/ui/AMapView
绘制圆形layer数组,海外服务器不支持
格式: [{'coordinate':{latitude: number, longitude: number}, 'radius':number, 'strokeColor': color, 'fillColor': color ,'id': 'string', 'lineWidth': numebr}]
Kind: inner property of miot/ui/AMapView
绘制线条数组,默认格式,海外服务器不支持
格式: ['coordinates':[{latitude: number, longitude: number}], 'id':'string']
Kind: inner property of miot/ui/AMapView
绘制自定义线条数组,海外服务器不支持
drawStyleIndexes: 颜色索引数组(使用颜色数组中的指定色),成员为number,且为非负数,负数按0处理
colors: 颜色数组,用于渲染线段
格式: ['coordinates':[{latitude: number, longitude: number}], 'drawStyleIndexes': [], colors: [color], 'renderGradient': boolean, 'renderLineWidth': number]
Kind: inner property of miot/ui/AMapView
用户位置更新回调,海外服务器不支持
Kind: inner property of miot/ui/AMapView
点击某坐标回调,海外服务器不支持
Kind: inner property of miot/ui/AMapView
选中某点标记回调,海外服务器不支持
Kind: inner property of miot/ui/AMapView
用户缩放地图回调,将要缩放,海外服务器不支持
Kind: inner property of miot/ui/AMapView
用户缩放地图回调,已经缩放,海外服务器不支持
Kind: inner property of miot/ui/AMapView