diag(gps): тестовый объект со стандартной иконкой в ObjectManager — разделение рендер vs layout

This commit is contained in:
2026-09-24 08:37:12 +03:00
parent d54d2db351
commit 0409a547fc

View File

@@ -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);
}