5858: Modification of the event send according to coordinate type

This commit is contained in:
MaximeE
2022-03-31 16:52:16 +02:00
parent e6538d8023
commit 31fedfa215
11 changed files with 71 additions and 29 deletions
@@ -118,8 +118,8 @@ extension LocationSharingMapView {
if let userLocationAnnotation = annotation as? UserLocationAnnotation {
return UserLocationAnnotatonView(userLocationAnnotation: userLocationAnnotation)
} else if annotation is MGLUserLocation, let currentUserAvatarData = locationSharingMapView.userAvatarData {
// Replace default current location annotation view with a UserLocationAnnotatonView
} else if annotation is MGLUserLocation && locationSharingMapView.mapCenterCoordinate == nil, let currentUserAvatarData = locationSharingMapView.userAvatarData {
// Replace default current location annotation view with a UserLocationAnnotatonView when the map is center on user location
return UserLocationAnnotatonView(avatarData: currentUserAvatarData)
}