Issue: Markers were moving when zooming and appearing off-screen, indicating coordinate system mismatch. Changes: - Reverted L.marker() and L.circle() to use standard [lat, lon] format - Enhanced debug logging to show: * GeoJSON format with labeled coordinates * Extracted lat/lon with source indices * Actual Leaflet marker call format * Explanation of coordinate system - Added clearer marker creation log The standard Leaflet coordinate format is [latitude, longitude]: - Latitude: -90 to +90 (South to North) - Longitude: -180 to +180 (West to East) This should fix markers drifting when zooming and appearing outside map bounds.pull/106/head
parent
cc8d2ae09b
commit
7c51b88567
@ -0,0 +1,26 @@
|
||||
# Test coordinate wrapping for Kamchatka, Russia
|
||||
# Kamchatka is around: 56°N, 162°E
|
||||
|
||||
lat = 56.0 # Correct latitude
|
||||
lon = 162.0 # Correct longitude (Eastern hemisphere)
|
||||
|
||||
print(f"Kamchatka, Russia:")
|
||||
print(f" Correct coordinates: lat={lat}, lon={lon}")
|
||||
print(f" Leaflet marker: L.marker([{lat}, {lon}])")
|
||||
print(f" This should plot in: Eastern Russia (Kamchatka Peninsula)")
|
||||
print()
|
||||
|
||||
# What if longitude is negative?
|
||||
lon_neg = -162.0
|
||||
print(f"If longitude was negative:")
|
||||
print(f" L.marker([{lat}, {lon_neg}])")
|
||||
print(f" This would plot in: Western Alaska (near Bering Strait)")
|
||||
print()
|
||||
|
||||
# Peru example
|
||||
peru_lat = -15.6
|
||||
peru_lon = -70.6
|
||||
print(f"Peru earthquake:")
|
||||
print(f" Correct coordinates: lat={peru_lat}, lon={peru_lon}")
|
||||
print(f" Leaflet marker: L.marker([{peru_lat}, {peru_lon}])")
|
||||
print(f" This should plot in: Peru, South America")
|
||||
Loading…
Reference in new issue