map dropdown

This commit is contained in:
='fauz
2025-07-03 00:41:31 +07:00
parent 9d9a23f995
commit 8e84a142c7
4 changed files with 85 additions and 70 deletions
Binary file not shown.
+3 -2
View File
@@ -21,7 +21,9 @@ def swap_latlon(coords):
def swap_latlon2(coords):
try:
sample = coords[0][0][0]
if not (-180 <= sample[0] <= 180 and -90 <= sample[1] <= 90):
lat, lon = sample
# if not (-180 <= sample[0] <= 180 and -90 <= sample[1] <= 90):
if -90 <= lat <= 90 and -180 <= lon <= 180:
return [
[
[
@@ -30,7 +32,6 @@ def swap_latlon2(coords):
] for polygon in coords
]
else:
# Sudah benar [lon, lat]
return coords
except Exception as e:
print(f"[swap_latlon] Error during coordinate swap: {e}")