feat(mobile): drift map page

This commit is contained in:
wuzihao051119 2025-07-16 15:18:27 +08:00 committed by mertalev
parent da5deffd03
commit d308d023c2
No known key found for this signature in database
GPG key ID: DF6ABC77AAD98C95
15 changed files with 783 additions and 0 deletions

View file

@ -0,0 +1,21 @@
import 'package:immich_mobile/domain/models/map.model.dart';
class MarkerBuilder {
final List<Marker> markers;
const MarkerBuilder({required this.markers});
static Map<String, dynamic> addFeature(Marker marker) => {
'type': 'Feature',
'id': marker.assetId,
'geometry': {
'type': 'Point',
'coordinates': [marker.location.longitude, marker.location.latitude],
},
};
Map<String, dynamic> generate() => {
'type': 'FeatureCollection',
'features': markers.map(addFeature).toList(),
};
}