From fb5fc51fc55ce2243c8fec0616a7cf8d326367ab Mon Sep 17 00:00:00 2001 From: bashrc Date: Mon, 18 May 2026 18:43:50 +0100 Subject: [PATCH] Remove latitude and longitude directions --- maps.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/maps.py b/maps.py index 77ec0f22c..fa19f3438 100644 --- a/maps.py +++ b/maps.py @@ -317,11 +317,21 @@ def get_location_from_post(post_json_object: {}) -> str: continue if property_dict['name'] == "GPSLongitude": longitude = property_dict['value'] + if isinstance(longitude, str): + if 'E' in longitude: + longitude = longitude.replace('E', '') + elif 'W' in longitude: + longitude = longitude.replace('W', '') if not is_float(longitude): if isinstance(longitude, str): longitude = float(longitude) if property_dict['name'] == "GPSLatitude": latitude = property_dict['value'] + if isinstance(latitude, str): + if 'S' in latitude: + latitude = latitude.replace('S', '') + elif 'N' in latitude: + latitude = latitude.replace('N', '') if not is_float(latitude): if isinstance(latitude, str): latitude = float(latitude)