There was an error while loading. Please reload this page.
1 parent 64b4677 commit a8d9db5Copy full SHA for a8d9db5
1 file changed
apps/web/src/lib/map-utils.ts
@@ -52,12 +52,13 @@ export function convertExifGPSToDecimal(exif: PickedExif | null): {
52
? GPSDirection.West
53
: GPSDirection.East
54
55
- // Apply reference direction to coordinates
56
- if (latitudeRef === GPSDirection.South) {
+ // Apply reference direction to coordinates only if they're positive
+ // Some EXIF tools already provide properly signed coordinates
57
+ if (latitudeRef === GPSDirection.South && latitude > 0) {
58
latitude = -latitude
59
}
60
- if (longitudeRef === GPSDirection.West) {
61
+ if (longitudeRef === GPSDirection.West && longitude > 0) {
62
longitude = -longitude
63
64
0 commit comments