feat: Implement initial PolyWeather application with interactive map UI, backend API, and Polymarket data client.

This commit is contained in:
2569718930@qq.com
2026-03-06 09:38:28 +08:00
parent b308709edb
commit d9876256b3
18 changed files with 755 additions and 1097 deletions
+4 -9
View File
@@ -88,15 +88,10 @@ function updateMapVisibility() {
if (!map.hasLayer(nearbyLayerGroup)) map.addLayer(nearbyLayerGroup);
}
// 2. Handle Primary City Markers (Major vs Minor)
Object.values(markers).forEach(({ marker, city }) => {
const isMajor = city.is_major !== false;
// Hide minor cities (like Ankara/Atlanta) when zoomed way out
if (zoom < 4 && !isMajor) {
if (map.hasLayer(marker)) map.removeLayer(marker);
} else {
if (!map.hasLayer(marker)) map.addLayer(marker);
}
// 2. Keep all primary city markers visible at all zoom levels.
// This avoids cities like Ankara disappearing when zoomed out.
Object.values(markers).forEach(({ marker }) => {
if (!map.hasLayer(marker)) map.addLayer(marker);
});
}