flutter_map折线bug,有一条线在地图上超级令人沮丧



我一直在使用flutter_maps并遇到这个令人沮丧的直线错误,我使用osm的多边形,然后编译它使折线它工作,但问题是有这条直线从a点到b点。

有人遇到并修复它吗?

我认为你应该使用URL Launcher https://pub.dev/packages/url_launcher因为它不是一个漫长的过程,很容易启动谷歌地图相比,创建谷歌地图的小部件和创建所有的东西,如折线和标记等。下面是一个非常有用的简单函数,您只需要传递经度和纬度:

static Future<void> showGoogleMapByURL(
double latitude, double longitude) async {
String googleMapUrl =
'https://www.google.com/maps/search/?api=1&query=$latitude,$longitude';
if (await canLaunchUrlString(googleMapUrl)) {
await launchUrlString(googleMapUrl);
} else {
throw ('Could not open the map ');
}

}

最新更新