var obj = {
type: 'FeatureCollection',
features: coords.map(function(p){
return {
type: 'Feature',
properties: {
balloonContent: p[2]
},
geometry: {
type: 'Point',
coordinates: [p[0], p[1]]
}
}
})
};
var objects = ymaps.geoQuery(obj);
objects.searchInside(myMap).addToMap(myMap);
myMap.events.add('boundschange', function () {
var visibleObjects = objects.searchInside(myMap).addToMap(myMap);
objects.remove(visibleObjects).removeFromMap(myMap);
});