Spaces:
Running
Running
Commit
·
047e32c
1
Parent(s):
69f3746
Update tools.js
Browse files
static/frontend/js/tools.js
CHANGED
|
@@ -309,7 +309,10 @@ function renderCardContent(toolName, toolData) {
|
|
| 309 |
}
|
| 310 |
|
| 311 |
// 模式 5:地理定位數據(forward_geocode / reverse_geocode)
|
| 312 |
-
|
|
|
|
|
|
|
|
|
|
| 313 |
console.log('✅ 匹配到模式 5: 地理定位數據');
|
| 314 |
return renderLocationData(toolData);
|
| 315 |
}
|
|
|
|
| 309 |
}
|
| 310 |
|
| 311 |
// 模式 5:地理定位數據(forward_geocode / reverse_geocode)
|
| 312 |
+
// forward_geocode: 有 best_match.lat/lon
|
| 313 |
+
// reverse_geocode: 直接有 lat/lon + display_name
|
| 314 |
+
if ((toolData.best_match && toolData.best_match.lat && toolData.best_match.lon) ||
|
| 315 |
+
(toolData.lat !== undefined && toolData.lon !== undefined && toolData.display_name)) {
|
| 316 |
console.log('✅ 匹配到模式 5: 地理定位數據');
|
| 317 |
return renderLocationData(toolData);
|
| 318 |
}
|