import '../entity/marker.dart';

enum MarkerType {
  mine(1),
  friend(2),
  traceStartPoint(3),
  traceEndFriendPoint(4),
  traceEndMinePoint(5);

  final int value;

  const MarkerType(this.value);

  static MarkerType fromValue(int value) {
    return values.firstWhere(
      (type) => type.value == value,
      orElse: () => throw Exception('转换异常'),
    );
  }
}

typedef MarkerTapCallback = void Function(Marker marker);
