diff --git a/app/__pycache__/mapController.cpython-313.pyc b/app/__pycache__/mapController.cpython-313.pyc index 57e6f3a..55efff6 100644 Binary files a/app/__pycache__/mapController.cpython-313.pyc and b/app/__pycache__/mapController.cpython-313.pyc differ diff --git a/app/mapController.py b/app/mapController.py index 28e7537..f8dff3e 100644 --- a/app/mapController.py +++ b/app/mapController.py @@ -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}") diff --git a/templates/index.html b/templates/index.html index 8fddd96..71105a9 100644 --- a/templates/index.html +++ b/templates/index.html @@ -119,11 +119,11 @@