11
This commit is contained in:
@ -202,5 +202,4 @@ export 'com/amap/api/trace/TraceListener.g.dart';
|
||||
export 'com/amap/api/trace/TraceOverlay.g.dart';
|
||||
export 'com/amap/api/trace/LBSTraceClient.g.dart';
|
||||
export 'package:uni_map_platform_interface/uni_map_platform_interface.dart';
|
||||
export 'package:url_launcher/url_launcher.dart';
|
||||
export '../facade/shared.g.dart';
|
||||
|
@ -7,7 +7,6 @@ import 'package:amap_map_fluttify/src/ios/ios.export.g.dart';
|
||||
import 'package:core_location_fluttify/core_location_fluttify.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
|
||||
import 'custom/android/PathSmoothTool.g.dart';
|
||||
import 'custom/ios/MALonLatPoint.g.dart';
|
||||
@ -321,22 +320,22 @@ class AmapService implements IMapService {
|
||||
}) async {
|
||||
return platform(
|
||||
android: (_) async {
|
||||
final urlScheme =
|
||||
'androidamap://navi?sourceApplication=$appName&lat=${target.latitude}&lon=${target.longitude}&dev=$dev&style=2';
|
||||
if (await canLaunchUrlString(urlScheme)) {
|
||||
await launchUrlString(urlScheme);
|
||||
} else {
|
||||
return Future.error('无法调起高德地图');
|
||||
}
|
||||
// final urlScheme =
|
||||
// 'androidamap://navi?sourceApplication=$appName&lat=${target.latitude}&lon=${target.longitude}&dev=$dev&style=2';
|
||||
// if (await canLaunchUrlString(urlScheme)) {
|
||||
// await launchUrlString(urlScheme);
|
||||
// } else {
|
||||
// return Future.error('无法调起高德地图');
|
||||
// }
|
||||
},
|
||||
ios: (_) async {
|
||||
final urlScheme =
|
||||
'iosamap://navi?sourceApplication=$appName&lat=${target.latitude}&lon=${target.longitude}&dev=$dev&style=2';
|
||||
if (await canLaunchUrlString(urlScheme)) {
|
||||
await launchUrlString(urlScheme);
|
||||
} else {
|
||||
return Future.error('无法调起高德地图');
|
||||
}
|
||||
// final urlScheme =
|
||||
// 'iosamap://navi?sourceApplication=$appName&lat=${target.latitude}&lon=${target.longitude}&dev=$dev&style=2';
|
||||
// if (await canLaunchUrlString(urlScheme)) {
|
||||
// await launchUrlString(urlScheme);
|
||||
// } else {
|
||||
// return Future.error('无法调起高德地图');
|
||||
// }
|
||||
},
|
||||
);
|
||||
}
|
||||
@ -351,13 +350,13 @@ class AmapService implements IMapService {
|
||||
int dev = 1,
|
||||
RideType rideType = RideType.bike,
|
||||
}) async {
|
||||
final urlScheme =
|
||||
'amapuri://openFeature?featureName=OnRideNavi&rideType=${rideType.inString()}&sourceApplication=$appName&lat=${target.latitude}&lon=${target.longitude}&dev=$dev';
|
||||
if (await canLaunchUrlString(urlScheme)) {
|
||||
await launchUrlString(urlScheme);
|
||||
} else {
|
||||
return Future.error('无法调起高德地图');
|
||||
}
|
||||
// final urlScheme =
|
||||
// 'amapuri://openFeature?featureName=OnRideNavi&rideType=${rideType.inString()}&sourceApplication=$appName&lat=${target.latitude}&lon=${target.longitude}&dev=$dev';
|
||||
// if (await canLaunchUrlString(urlScheme)) {
|
||||
// await launchUrlString(urlScheme);
|
||||
// } else {
|
||||
// return Future.error('无法调起高德地图');
|
||||
// }
|
||||
}
|
||||
|
||||
/// 轨迹纠偏
|
||||
|
@ -128,5 +128,4 @@ export 'MACustomBuildingOverlay.g.dart';
|
||||
export 'MAOfflineItemMunicipality.g.dart';
|
||||
export 'MAHeatMapVectorGridOverlayOptions.g.dart';
|
||||
export 'package:uni_map_platform_interface/uni_map_platform_interface.dart';
|
||||
export 'package:url_launcher/url_launcher.dart';
|
||||
export '../facade/shared.g.dart';
|
||||
|
Reference in New Issue
Block a user