diff --git a/client/src/components/gps/Yandex21Map.tsx b/client/src/components/gps/Yandex21Map.tsx index 50d1368..6a47b04 100644 --- a/client/src/components/gps/Yandex21Map.tsx +++ b/client/src/components/gps/Yandex21Map.tsx @@ -331,10 +331,20 @@ export function Yandex21Map({ collection.add(placemark); } } - // ДИАГНОСТИКА: убрать после починки + // ДИАГНОСТИКА: убрать после починки — тестовый объект со СТАНДАРТНОЙ + // иконкой в центре карты: если он виден, ObjectManager работает, а ломает + // рендер наш кастомный iconLayout + omObjects.push({ + id: '__diag_test__', + type: 'Feature', + geometry: { type: 'Point', coordinates: [mapRef.current ? mapRef.current.getCenter()[1] : 37.6, mapRef.current ? mapRef.current.getCenter()[0] : 55.7] }, + options: { preset: 'islands#redDotIcon' }, + properties: {}, + }); try { if (omObjects.length > 0) objectManager.add(omObjects); - console.log('[GPS-DIAG] OM added', omObjects.length, 'objects'); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + console.log('[GPS-DIAG] OM added', omObjects.length, 'objects; getLength=', (objectManager.objects as any).getLength?.()); } catch (err) { console.error('[GPS-DIAG] OM add FAILED', err); }