Преглед на файлове

[fix]修复我的marker未正确显示的问题

zk преди 6 месеца
родител
ревизия
373d6efeb0
променени са 2 файла, в които са добавени 6 реда и са изтрити 3 реда
  1. 4 1
      lib/utils/location_convert_marker_util.dart
  2. 2 2
      plugins/map/lib/src/consts/map_constants.dart

+ 4 - 1
lib/utils/location_convert_marker_util.dart

@@ -1,5 +1,6 @@
 import 'package:flutter_map/flutter_map.dart';
 import 'package:location/data/bean/user_info.dart';
+import 'package:location/data/consts/constants.dart';
 
 class Location2MarkerUtil {
   Location2MarkerUtil._();
@@ -10,7 +11,9 @@ class Location2MarkerUtil {
       markerName: e.getUserNickName(),
       longitude: e.lastLocation.value?.longitude,
       latitude: e.lastLocation.value?.latitude,
-      markerType: MarkerType.friend,
+      markerType: e.id == Constants.mineLocationId
+          ? MarkerType.mine
+          : MarkerType.friend,
       isSelected: isSelected,
     );
   }

+ 2 - 2
plugins/map/lib/src/consts/map_constants.dart

@@ -5,10 +5,10 @@ class MapConstants {
   static const String mapLocationEventChannel =
       'atmob_map_location_event_channel';
 
-  //地图方法通道名称
+  //地图SDK通道名称
   static const String mapMethodChannel = 'atmob_map_method_channel';
 
-  //地图渠道名称
+  //地图widget通道
   static const String mapViewChannelName = "com.atmob.flutter_map/map_view_";
 
   //地图widget_viewType名称