AmapController class

地图控制类

Mixed in types

Constructors

AmapController.android(com_amap_api_maps_MapView androidController, _AmapViewState _state, _OnMapCreated onMapCreated)
Android构造器
AmapController.ios(MAMapView iosController, _AmapViewState _state)
iOS构造器

Properties

androidController ↔ com_amap_api_maps_MapView
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
iosController ↔ MAMapView
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

addCircle(CircleOption option) Future<Circle>
添加圆 [...]
addMarker(MarkerOption option) Future<Marker>
添加marker [...]
addMarkers(List<MarkerOption> options) Future<List<Marker>>
批量添加marker [...]
addPolygon(PolygonOption option) Future<Polygon>
添加多边形 [...]
addPolyline(PolylineOption option) Future<Polyline>
添加折线 [...]
clear() Future<void>
清除地图上所有覆盖物
clearMarkers() Future<void>
清除所有marker
didChangeAccessibilityFeatures() → void
Called when the system changes the set of currently active accessibility features. [...]
inherited
didChangeAppLifecycleState(AppLifecycleState state) → void
Called when the system puts the app in the background or returns the app to the foreground. [...]
override
didChangeLocales(List<Locale> locales) → void
Called when the system tells the app that the user's locale has changed. For example, if the user changes the system language settings. [...]
inherited
didChangeMetrics() → void
Called when the application's dimensions change. For example, when a phone is rotated. [...]
inherited
didChangePlatformBrightness() → void
Called when the platform brightness changes. [...]
inherited
didChangeTextScaleFactor() → void
Called when the platform's text scale factor changes. [...]
inherited
didHaveMemoryPressure() → void
Called when the system is running low on memory. [...]
inherited
didPopRoute() Future<bool>
Called when the system tells the app to pop the current route. For example, on Android, this is called when the user presses the back button. [...]
inherited
didPushRoute(String route) Future<bool>
Called when the host tells the application to push a new route onto the navigator. [...]
inherited
didPushRouteInformation(RouteInformation routeInformation) Future<bool>
Called when the host tells the application to push a new RouteInformation and a restoration state onto the router. [...]
inherited
dispose() Future<void>
fromScreenLocation(Point point) Future<LatLng>
屏幕坐标转经纬度坐标
getCenterCoordinate() Future<LatLng>
获取地图中心点
getLocation({Duration interval = const Duration(milliseconds: 500), Duration timeout = const Duration(seconds: 10)}) Future<LatLng>
获取当前位置 [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
requireAlwaysAuth() Future<void>
请求后台定位 *仅iOS
screenShot(OnScreenShot onScreenShot) Future<void>
截图
setAllGesturesEnabled(bool enable) Future<void>
所有手势使能
setCenterCoordinate(double lat, double lng, {double zoomLevel, bool animated = true}) Future<void>
设置地图中心点
setCustomMapStyle({String styleDataPath, String styleExtraPath, String texturePath}) Future<void>
自定义地图 [...]
setInfoWindowClickListener(OnMarkerClicked onInfoWindowClicked) Future<void>
Marker弹窗点击事件监听
setMapClickedListener(OnMapClicked onMapClick) Future<void>
设置地图点击监听事件
setMapLanguage(Language language) Future<void>
选择地图语言
setMapMoveListener({OnMapMove onMapMoveStart, OnMapMove onMapMoveEnd}) Future<void>
设置地图移动监听事件
setMapType(MapType mapType) Future<void>
选择显示图层
setMarkerClickedListener(OnMarkerClicked onMarkerClicked) Future<void>
设置marker点击监听事件
setMarkerDragListener({OnMarkerDrag onMarkerDragStart, OnMarkerDrag onMarkerDragging, OnMarkerDrag onMarkerDragEnd}) Future<void>
设置marker拖动监听事件
setMyLocationChangeListener(OnLocationChange onLocationChange) Future<void>
设置地图移动监听事件 [...]
setMyLocationRotateAngle(double angle) Future<void>
设置我的位置图标旋转角度
setRotateGesturesEnabled(bool enable) Future<void>
旋转手势使能
setScrollGesturesEnabled(bool enable) Future<void>
滑动手势使能
setTiltGesturesEnabled(bool enable) Future<void>
旋转手势使能
setZoomByCenter(bool byCenter) Future<void>
设置缩放是否以中心点为锚点
setZoomGesturesEnabled(bool enable) Future<void>
缩放手势使能
setZoomLevel(double level, {bool animated = true}) Future<void>
设置缩放大小 [...]
showCompass(bool enable) Future<void>
显示指南针
showIndoorMap(bool show) Future<void>
是否显示室内地图
showLocateControl(bool enable) Future<void>
显示定位按钮
showMyLocation(bool show, {Uri iconUri, ImageConfiguration imageConfig, Color strokeColor, Color fillColor, double strokeWidth}) Future<void>
是否显示我的位置 [...]
showScaleControl(bool enable) Future<void>
显示比例尺控件
showTraffic(bool enable) Future<void>
显示路况信息
showZoomControl(bool enable) Future<void>
显示缩放控件
toScreenLocation(LatLng coord) Future<Point>
经纬度坐标转屏幕坐标
toString() String
A string representation of this object. [...]
inherited
zoomIn({bool animated = true}) Future<void>
放大一个等级
zoomOut({bool animated = true}) Future<void>
放大一个等级
zoomToSpan(List<LatLng> bounds, {int padding = 50, bool animated = true}) Future<void>
将指定的经纬度列表(包括但不限于marker, polyline, polygon等)调整至同一屏幕中显示 [...]

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited