我的项目上安装了Yandex地图
下面的代码显示所有对象的集群视图。 我想做的是禁用群集
$.getJSON( ymFormAction , "ymJSON=1" ).done( function (json) {
window.geoObjects = ymaps.geoQuery(json);
window.clusters = geoObjects.search("geometry.type == 'Point'").clusterize({preset: 'islands#invertedblueClusterIcons'});
myMap[[+idMap]].geoObjects.add(clusters);
// Trying to disable clusters
var coords = geoObjects;
// coords should be = [[56.023, 36.988]] according to API
var myCollection = new ymaps.GeoObjectCollection();
for (var i = 0; i<coords.length; i++) {
myCollection.add(new ymaps.Placemark(coords[i]));
}
myMap[[+idMap]].geoObjects.add(myCollection);
});