From 0baad8d09498b7eb474523ce54e985e597c17a2f Mon Sep 17 00:00:00 2001 From: bashrc Date: Mon, 18 May 2026 18:53:17 +0100 Subject: [PATCH] West is negative --- maps.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/maps.py b/maps.py index a39dc6ff7..25f53946c 100644 --- a/maps.py +++ b/maps.py @@ -317,14 +317,18 @@ def get_location_from_post(post_json_object: {}) -> str: continue if property_dict['name'] == "GPSLongitude": longitude = property_dict['value'] + is_west = False if isinstance(longitude, str): if 'E' in longitude: longitude = longitude.replace('E', '') elif 'W' in longitude: longitude = longitude.replace('W', '') + is_west = True if not is_float(longitude): if isinstance(longitude, str): longitude = float(longitude) + if is_west and longitude > 0: + longitude = - longitude if property_dict['name'] == "GPSLatitude": latitude = property_dict['value'] is_south = False