Yandex映射api v2很好地显示了映射上的对象。当我在浏览器控制台中执行时:
window.myMap.geoObjects.each(function(obj){console.log(obj.geometry);})
它打印
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
我想得到地图上每个地理对象的坐标。他们在哪里?
window.myMap.geoObjects.each(function(obj) {
console.log(obj.geometry.getCoordinates());
});