Spaces:
Sleeping
Sleeping
ok
Browse files
.DS_Store
CHANGED
|
Binary files a/.DS_Store and b/.DS_Store differ
|
|
|
app.py
CHANGED
|
@@ -504,7 +504,7 @@ def create_wind_map(region="global", forecast_mode=False):
|
|
| 504 |
|
| 505 |
velocity_js = """
|
| 506 |
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
|
| 507 |
-
<script src="https://
|
| 508 |
"""
|
| 509 |
m.get_root().html.add_child(Element(velocity_js))
|
| 510 |
|
|
@@ -591,11 +591,21 @@ def create_wind_map(region="global", forecast_mode=False):
|
|
| 591 |
}}
|
| 592 |
}}
|
| 593 |
|
| 594 |
-
// Check if L.velocityLayer exists
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 595 |
if (typeof L.velocityLayer === 'undefined') {{
|
| 596 |
-
console.error("Leaflet-Velocity not loaded
|
|
|
|
|
|
|
| 597 |
return;
|
| 598 |
}}
|
|
|
|
| 599 |
|
| 600 |
// Function to create 10m wind layer
|
| 601 |
function create10mLayer() {{
|
|
|
|
| 504 |
|
| 505 |
velocity_js = """
|
| 506 |
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
|
| 507 |
+
<script src="https://cdn.jsdelivr.net/npm/leaflet-velocity@1.8.0/dist/leaflet-velocity.min.js"></script>
|
| 508 |
"""
|
| 509 |
m.get_root().html.add_child(Element(velocity_js))
|
| 510 |
|
|
|
|
| 591 |
}}
|
| 592 |
}}
|
| 593 |
|
| 594 |
+
// Check if L.velocityLayer exists with retry logic
|
| 595 |
+
if (typeof L === 'undefined') {{
|
| 596 |
+
console.error("❌ Leaflet library not loaded!");
|
| 597 |
+
console.error("Retrying in 2 seconds...");
|
| 598 |
+
setTimeout(arguments.callee, 2000);
|
| 599 |
+
return;
|
| 600 |
+
}}
|
| 601 |
+
|
| 602 |
if (typeof L.velocityLayer === 'undefined') {{
|
| 603 |
+
console.error("❌ Leaflet-Velocity plugin not loaded!");
|
| 604 |
+
console.error("Retrying in 2 seconds...");
|
| 605 |
+
setTimeout(arguments.callee, 2000);
|
| 606 |
return;
|
| 607 |
}}
|
| 608 |
+
console.log("✅ Libraries loaded successfully");
|
| 609 |
|
| 610 |
// Function to create 10m wind layer
|
| 611 |
function create10mLayer() {{
|