fix(gps): формат объектов ObjectManager — GeoJSON Feature с coordinates [lng,lat]

This commit is contained in:
2026-09-23 14:49:27 +03:00
parent 39c8d61a04
commit 4b532540be

View File

@@ -304,8 +304,10 @@ export function Yandex21Map({
const l = gpsMarkerLayout(m); const l = gpsMarkerLayout(m);
omObjects.push({ omObjects.push({
id: String(m.id), id: String(m.id),
type: 'Point', // ObjectManager принимает GeoJSON-подобный формат:
geometry: [m.lat, m.lng], // type: 'Feature', geometry { type: 'Point', coordinates: [lng, lat] }
type: 'Feature',
geometry: { type: 'Point', coordinates: [m.lng, m.lat] },
options: { options: {
iconLayout: ymaps.templateLayoutFactory.createClass(gpsMarkerHtml(m)), iconLayout: ymaps.templateLayoutFactory.createClass(gpsMarkerHtml(m)),
iconOffset: [-l.anchorX, -l.anchorY], iconOffset: [-l.anchorX, -l.anchorY],