var mapManager = new ymaps.ObjectManager({
clusterize: true,
gridSize: 32,
clusterDisableClickZoom: true
});
mapManager.objects.options.set('preset', 'islands#blackDotIcon');
mapManager.clusters.options.set('preset', 'islands#blackClusterIcons');
map.geoObjects.add(mapManager);
mapManager.removeAll();
let items = [];
items.push({
type: 'Feature',
id: data.id,
geometry: { type: 'Point', coordinates: [data.lat, data.lng] },
properties: {
clusterCaption: data.title,
hintContent: data.title,
balloonContentHeader: data.header,
balloonContentBody: data.description,
balloonContentFooter: data.footer,
yourProperty1: data.prop1,
yourProperty2: data.prop2
}
});
mapManager.add({ type: 'FeatureCollection', features: items });
mapManager.getMap().setBounds(
mapManager.getBounds(),
{ checkZoomRange: true, useMapMargin: true }
);