Skip to content

Latitude/longitude values are not parsable. latValue=0/1,0/1,0/1, latRef=, lngValue=0/1,0/1,0/1, lngRef= #33

Description

@Jyoshnarani

await exif!.getLatLong() retuning null value

Future<ExifLatLong?> getLatLong() async {
final attributes = await getAttributes();
if (attributes == null) return null;

final latitude = attributes['GPSLatitude'];
final latitudeRef = attributes['GPSLatitudeRef'];
final longitude = attributes['GPSLongitude'];
final longitudeRef = attributes['GPSLongitudeRef'];
if (latitude is! double || latitudeRef is! String || longitude is! double || longitudeRef is! String) {
  return null;
}

return ExifLatLong(
  latitude: latitude * (latitudeRef == 'S' ? -1 : 1),
  longitude: longitude * (longitudeRef == 'W' ? -1 : 1),
);

}

This is coming in Android OS version - 14 device

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions