gotoTencentMap static method
Tencent Map / 腾讯地图
Implementation
static Future<bool> gotoTencentMap(longitude, latitude) async {
var url = 'qqmap://map/routeplan?type=drive&fromcoord=CurrentLocation&tocoord=$latitude,$longitude&referer=IXHBZ-QIZE4-ZQ6UP-DJYEO-HC2K2-EZBXJ';
bool canLaunchMap = await canLaunchUrl(Uri.parse(url));
if (!canLaunchMap) {
Utils.toast(('未检测到腾讯地图')); // "Not detect Tencent Map"
return false;
}
await launchUrl(
Uri.parse(url),
mode: LaunchMode.externalApplication,
);
return canLaunchMap;
}