fix(gps): формат объектов ObjectManager — GeoJSON Feature с coordinates [lng,lat]
This commit is contained in:
@@ -304,8 +304,10 @@ export function Yandex21Map({
|
||||
const l = gpsMarkerLayout(m);
|
||||
omObjects.push({
|
||||
id: String(m.id),
|
||||
type: 'Point',
|
||||
geometry: [m.lat, m.lng],
|
||||
// ObjectManager принимает GeoJSON-подобный формат:
|
||||
// type: 'Feature', geometry { type: 'Point', coordinates: [lng, lat] }
|
||||
type: 'Feature',
|
||||
geometry: { type: 'Point', coordinates: [m.lng, m.lat] },
|
||||
options: {
|
||||
iconLayout: ymaps.templateLayoutFactory.createClass(gpsMarkerHtml(m)),
|
||||
iconOffset: [-l.anchorX, -l.anchorY],
|
||||
|
||||
Reference in New Issue
Block a user