隐藏高的地图

master
章文轩 3 years ago
parent dd0abc7e05
commit 7d15816676

@ -501,59 +501,59 @@ class _InspectionManageDetailsPageState
SizedBox(
width: double.infinity,
height: 343.w,
child: AMapWidget(
rotateGesturesEnabled: false,
scaleEnabled: false,
scrollGesturesEnabled: false,
tiltGesturesEnabled: false,
zoomGesturesEnabled: false,
onMapCreated: (controller) {
_aMapController = controller;
LatLng _target = LatLng(
appProvider.location!['latitude'] as double,
appProvider.location!['longitude'] as double);
_aMapController!.moveCamera(CameraUpdate.newCameraPosition(
CameraPosition(target: _target, zoom: 19)));
},
myLocationStyleOptions: MyLocationStyleOptions(true,
circleFillColor: Colors.yellow.withOpacity(0.1),
circleStrokeColor: Colors.transparent,
icon: BitmapDescriptor.defaultMarkerWithHue(210)),
onLocationChanged: (argument) async {
_aMapController!.moveCamera(CameraUpdate.newCameraPosition(
CameraPosition(target: argument.latLng, zoom: 19)));
if (_canUploadLocation) {
BaseModel baseModel = await (_uploadLocation(widget.executeId,
argument.latLng.longitude, argument.latLng.latitude));
if (!baseModel.success) {
BotToast.showText(text: baseModel.msg);
} else {
_canUploadLocation = false;
//线
_points.add(argument.latLng);
if (_points.length % 5 == 0) {
if (_polylines.isEmpty) {
_polylines.add(Polyline(
points: _points,
color: Colors.red,
width: 10.w,
));
setState(() {});
} else {
_polylines[0] = (Polyline(
points: _points,
color: Colors.red,
width: 10.w,
));
setState(() {});
}
}
}
}
},
//线
polylines: Set<Polyline>.of(_polylines),
),
// child: AMapWidget(
// rotateGesturesEnabled: false,
// scaleEnabled: false,
// scrollGesturesEnabled: false,
// tiltGesturesEnabled: false,
// zoomGesturesEnabled: false,
// onMapCreated: (controller) {
// _aMapController = controller;
// LatLng _target = LatLng(
// appProvider.location!['latitude'] as double,
// appProvider.location!['longitude'] as double);
// _aMapController!.moveCamera(CameraUpdate.newCameraPosition(
// CameraPosition(target: _target, zoom: 19)));
// },
// myLocationStyleOptions: MyLocationStyleOptions(true,
// circleFillColor: Colors.yellow.withOpacity(0.1),
// circleStrokeColor: Colors.transparent,
// icon: BitmapDescriptor.defaultMarkerWithHue(210)),
// onLocationChanged: (argument) async {
// _aMapController!.moveCamera(CameraUpdate.newCameraPosition(
// CameraPosition(target: argument.latLng, zoom: 19)));
// if (_canUploadLocation) {
// BaseModel baseModel = await (_uploadLocation(widget.executeId,
// argument.latLng.longitude, argument.latLng.latitude));
// if (!baseModel.success) {
// BotToast.showText(text: baseModel.msg);
// } else {
// _canUploadLocation = false;
// //线
// _points.add(argument.latLng);
// if (_points.length % 5 == 0) {
// if (_polylines.isEmpty) {
// _polylines.add(Polyline(
// points: _points,
// color: Colors.red,
// width: 10.w,
// ));
// setState(() {});
// } else {
// _polylines[0] = (Polyline(
// points: _points,
// color: Colors.red,
// width: 10.w,
// ));
// setState(() {});
// }
// }
// }
// }
// },
// //线
// polylines: Set<Polyline>.of(_polylines),
// ),
),
],
)

@ -48,7 +48,7 @@ class _InspectionManagePageState extends State<InspectionManagePage>
return AkuScaffold(
title: '巡检管理',
appBarBottom: PreferredSize(
child: AkuTabBar(controller: _tabController!, tabs: _tabs),
child: AkuTabBar(controller: _tabController!, tabs: _tabs,isScrollable: true,),
preferredSize: Size.fromHeight(96.w),
),
body: TabBarView(

@ -11,6 +11,7 @@ import 'package:aku_new_community_manager/utils/dev_util.dart';
import 'package:aku_new_community_manager/utils/hive_store.dart';
import 'package:aku_new_community_manager/utils/websocket/fier_dialog.dart';
import 'package:aku_new_community_manager/utils/websocket/web_socket_util.dart';
import 'package:amap_flutter_location/amap_flutter_location.dart';
import 'package:equatable/equatable.dart';
// Package imports:
import 'package:flutter/cupertino.dart';
@ -119,8 +120,8 @@ class _SplashPageState extends State<SplashPage> {
///
EquatableConfig.stringify = true;
// AMapFlutterLocation.updatePrivacyShow(true, true);
// AMapFlutterLocation.updatePrivacyAgree(true);
AMapFlutterLocation.updatePrivacyShow(true, true);
AMapFlutterLocation.updatePrivacyAgree(true);
WebSocketUtil().initWebSocket(
consolePrint: false,
onReceiveMes: (message) async {

@ -14,21 +14,21 @@ packages:
name: amap_flutter_base
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
version: "3.0.0"
amap_flutter_location:
dependency: "direct main"
description:
name: amap_flutter_location
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
version: "3.0.0"
amap_flutter_map:
dependency: "direct main"
description:
name: amap_flutter_map
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.1"
version: "3.0.0"
analyzer:
dependency: transitive
description:

@ -47,9 +47,9 @@ dependencies:
expandable: ^5.0.1
url_launcher: ^6.0.3
amap_flutter_map: ^2.0.1
amap_flutter_location: ^2.0.0
amap_flutter_base: ^2.0.0
amap_flutter_map: ^3.0.0
amap_flutter_location: ^3.0.0
amap_flutter_base: ^3.0.0
permission_handler: ^6.1.1
velocity_x: ^2.6.0

Loading…
Cancel
Save