Refactor map tools and drop SocialParser runtime dependency.

Add filtered map API, creamy-caprice-style toolbar (dates, layers, search), Yandex ru tiles, and store Telegram session in MapMil/data instead of mounting SocialParser.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-30 20:56:30 +03:00
co-authored by Cursor
parent 2c16bc0b56
commit 1d6d54ab9f
28 changed files with 3182 additions and 616 deletions
+2 -44
View File
@@ -1,55 +1,13 @@
import os
from datetime import datetime, timezone
from sqlalchemy.orm import Session
from .models import Consumer, ConsumerFilter, MapObject
from .models import Consumer, ConsumerFilter
from .services.filtering import hash_api_key
SEED_OBJECTS = [
{
"name": "Красная площадь",
"description": "Главная площадь Москвы, исторический центр города.",
"type": "marker",
"latitude": 55.7539,
"longitude": 37.6208,
"created_at": datetime(2018, 5, 9, 12, 0, tzinfo=timezone.utc),
},
{
"name": "ВДНХ",
"description": "Выставка достижений народного хозяйства — крупный выставочный комплекс.",
"type": "zone",
"latitude": 55.8298,
"longitude": 37.6361,
"created_at": datetime(2020, 8, 15, 10, 30, tzinfo=timezone.utc),
},
{
"name": "МГУ",
"description": "Московский государственный университет имени М.В. Ломоносова.",
"type": "point",
"latitude": 55.7033,
"longitude": 37.5307,
"created_at": datetime(2022, 2, 12, 14, 0, tzinfo=timezone.utc),
},
{
"name": "Парк Горького",
"description": "Центральный парк культуры и отдыха имени М. Горького.",
"type": "other",
"latitude": 55.7312,
"longitude": 37.6013,
"created_at": datetime(2024, 6, 1, 9, 0, tzinfo=timezone.utc),
},
]
def seed_objects(db: Session) -> None:
if db.query(MapObject).count() > 0:
return
for item in SEED_OBJECTS:
db.add(MapObject(**item))
db.commit()
"""No demo map objects — map shows ingested events only."""
def seed_test_consumer(db: Session) -> None: