Question

Yandex map api v2 shows objects on map well. When I execute in browser console:

window.myMap.geoObjects.each(function(obj){console.log(obj.geometry);})

It prints

s {_Mh: Array[2], events: s, options: o, _S: l, _Xr: s…}
_Bb: Array[2]
_EC: 3
_GC: Array[2]
_HC: s
_Mh: Array[2]
_S: l
_Xr: s
events: s
options: o
__proto__: Object

I want to get coordinates of every geo object on map. Where are they?

Was it helpful?

Solution

window.myMap.geoObjects.each(function(obj) {
  console.log(obj.geometry.getCoordinates());
});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top