AMapWidget constructor
- {Key key,
- AMapApiKey apiKey,
- CameraPosition initialCameraPosition: const CameraPosition(target: LatLng(39.909187, 116.397451), zoom: 10),
- MapType mapType: MapType.normal,
- bool buildingsEnabled: true,
- bool compassEnabled: false,
- bool labelsEnabled: true,
- LatLngBounds limitBounds,
- MinMaxZoomPreference minMaxZoomPreference,
- bool rotateGesturesEnabled: true,
- bool scaleEnabled: true,
- bool scrollGesturesEnabled: true,
- bool tiltGesturesEnabled: true,
- bool touchPoiEnabled: true,
- bool trafficEnabled: false,
- bool zoomGesturesEnabled: true,
- MapCreatedCallback onMapCreated,
- Set<
Factory< gestureRecognizers,OneSequenceGestureRecognizer> > - CustomStyleOptions customStyleOptions,
- MyLocationStyleOptions myLocationStyleOptions,
- ArgumentCallback<
CameraPosition> onCameraMove, - ArgumentCallback<
CameraPosition> onCameraMoveEnd, - ArgumentCallback<
AMapLocation> onLocationChanged, - ArgumentCallback<
LatLng> onTap, - ArgumentCallback<
LatLng> onLongPress, - ArgumentCallback<
AMapPoi> onPoiTouched, - Set<
Marker> markers, - Set<
Polyline> polylines, - Set<
Polygon> polygons}
创建一个展示高德地图的widget
AssertionError will be thrown if initialCameraPosition
is null;
Implementation
const AMapWidget({
Key key,
this.apiKey,
this.initialCameraPosition =
const CameraPosition(target: LatLng(39.909187, 116.397451), zoom: 10),
this.mapType = MapType.normal,
this.buildingsEnabled = true,
this.compassEnabled = false,
this.labelsEnabled = true,
this.limitBounds,
this.minMaxZoomPreference,
this.rotateGesturesEnabled = true,
this.scaleEnabled = true,
this.scrollGesturesEnabled = true,
this.tiltGesturesEnabled = true,
this.touchPoiEnabled = true,
this.trafficEnabled = false,
this.zoomGesturesEnabled = true,
this.onMapCreated,
this.gestureRecognizers,
this.customStyleOptions,
this.myLocationStyleOptions,
this.onCameraMove,
this.onCameraMoveEnd,
this.onLocationChanged,
this.onTap,
this.onLongPress,
this.onPoiTouched,
this.markers,
this.polylines,
this.polygons,
}) : assert(initialCameraPosition != null),
super(key: key);