Skip to content

Commit a46405a

Browse files
committed
Treat point annotation images as scaled to the current screen scale on iOS
1 parent 519885f commit a46405a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ios/Classes/PointAnnotationController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ extension FLTPointAnnotationOptions {
906906
func toPointAnnotation() -> PointAnnotation {
907907
var annotation = PointAnnotation(coordinate: convertDictionaryToCLLocationCoordinate2D(dict: self.geometry)!)
908908
if let image = self.image {
909-
annotation.image = .init(image: UIImage(data: image.data)!, name: UUID().uuidString)
909+
annotation.image = .init(image: UIImage(data: image.data, scale: UIScreen.main.scale)!, name: UUID().uuidString)
910910
}
911911
annotation.iconAnchor = IconAnchor.allCases[Int(self.iconAnchor?.value.rawValue ?? 0)]
912912
if let iconImage = self.iconImage {
@@ -986,7 +986,7 @@ extension FLTPointAnnotation {
986986
func toPointAnnotation() -> PointAnnotation {
987987
var annotation = PointAnnotation(id: self.id, coordinate: convertDictionaryToCLLocationCoordinate2D(dict: self.geometry)!)
988988
if let image = self.image {
989-
annotation.image = .init(image: UIImage(data: image.data)!, name: UUID().uuidString)
989+
annotation.image = .init(image: UIImage(data: image.data, scale: UIScreen.main.scale)!, name: UUID().uuidString)
990990
}
991991
annotation.iconAnchor = IconAnchor.allCases[Int(self.iconAnchor?.value.rawValue ?? 0)]
992992
if let iconImage = self.iconImage {

0 commit comments

Comments
 (0)