Flutter:如何将多张照片或图标内的照片链接到地理定位标记?

时间:2021-04-04 18:57:41

标签: android flutter google-maps

我完全不知所措。事实是“google_maps_flutter”只允许 BitmapDescriptor 类型自定义地理位置标记。但是如果我想从数据库加载一张照片,同时在这张照片周围有某种轮廓怎么办?在这种情况下,我该如何更改自定义标记?

1 个答案:

答案 0 :(得分:0)

我想你可以这样做:

  BitmapDescriptor pinLocationIcon;

      BitmapDescriptor.fromAssetImage(
         ImageConfiguration(devicePixelRatio: 2.5),
         'assets/destination_map_marker.png').then((onValue) {
            pinLocationIcon = onValue;
         });

相关问题