fix(tradein/v2): настоящая карта Leaflet+OSM вместо декоративного псевдо-SVG #2528

Merged
lekss361 merged 2 commits from fix/tradein-v2-real-map into main 2026-07-26 20:02:29 +00:00

2 commits

Author SHA1 Message Date
bot-backend
99f1a4a733 fix(tradein/v2): reset map CDN-error flag on retry
All checks were successful
CI Trade-In / changes (pull_request) Successful in 9s
CI / changes (pull_request) Successful in 12s
CI Trade-In / backend-tests (pull_request) Has been skipped
CI / backend-tests (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Has been skipped
CI Trade-In / frontend-checks (pull_request) Successful in 1m14s
Без сброса ветка ошибки — тупик: она подменяет контейнер карты в дереве
рендера, поэтому mapContainerRef остаётся null и повторная попытка не может
удаться. Один сбой unpkg убивал карту до перезагрузки страницы, даже после
выбора другого адреса. Найдено на pre-push ревью.
2026-07-26 22:51:56 +03:00
bot-backend
a1e12db72f fix(tradein/v2): replace decorative pseudo-map with real Leaflet+OSM map in ParamsPanel
01 ПАРАМЕТРЫ КВАРТИРЫ showed a fake SVG (grid + invented streets + radius
rings) above the address field, with no real coordinates driving it — the
+/- buttons scaled the picture, not a map. Replaced with a real Leaflet map
(same CDN-loader/tile pattern as SourcesMap.tsx/MapPicker.tsx):

- centred on coords from the picked geocode suggestion (lat/lon), with a
  marker on the address
- radius circle in real metres (L.circle), synced with РАДИУС АНАЛИЗА;
  "Авто" previews the backend's primary two-tier default (1000 m)
- +/- buttons drive real Leaflet zoom (zoomIn/zoomOut), not a CSS scale hack
- removed the "Схематично · не географическая карта" disclaimer (no longer
  true) — OSM attribution now comes from Leaflet's own attribution control
- tidy placeholder (icon + hint text) while no address is picked yet,
  instead of an empty box or a broken map

The old %-projected analog price pins (mapMarkers()) are not replotted on
the real map — their positions were fabricated against a fixed non-scale
grid and would be geographically wrong at the map's real zoom.
2026-07-26 22:38:36 +03:00