diff --git a/client/src/components/gps/Yandex21Map.tsx b/client/src/components/gps/Yandex21Map.tsx index 536704a..540991a 100644 --- a/client/src/components/gps/Yandex21Map.tsx +++ b/client/src/components/gps/Yandex21Map.tsx @@ -268,6 +268,15 @@ export function Yandex21Map({ { iconLayout: ymaps.templateLayoutFactory.createClass(gpsMarkerHtml(m)), iconOffset: [-layout.anchorX, -layout.anchorY], + // Активная область клика: без iconShape у кастомного iconLayout + // hit-test Яндекса не находит метку — клики уходят в events-pane + iconShape: { + type: 'Rectangle', + coordinates: [ + [0, 0], + [layout.width, layout.height], + ], + } as unknown as ymaps.IGeometryJson, ...(m.zIndex !== undefined ? { zIndex: m.zIndex } : {}), } );