fix(gps): формат объектов ObjectManager — GeoJSON Feature с coordinates [lng,lat]
This commit is contained in:
@@ -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],
|
||||||
|
|||||||
Reference in New Issue
Block a user