ymaps.ready(function () {
var map = new ymaps.Map(
'map-pickups',
{center: [55.75, 37.64], zoom: 10, controls: ['zoomControl', 'fullscreenControl']},
{searchControlProvider: 'yandex#search'}
);
var objManager = new ymaps.ObjectManager({
clusterize: true,
gridSize: 32,
clusterDisableClickZoom: true
});
objManager.objects.options.set('preset', 'islands#blueDotIcon');
objManager.clusters.options.set('preset', 'islands#blueClusterIcons');
map.geoObjects.add(objManager);
var pickups = {
type: 'FeatureCollection',
features: []
};
var coordinates = [
[55.831903, 37.411961],
[55.763338, 37.565466],
[55.763338, 37.565466],
[55.744522, 37.616378],
[55.780898, 37.642889],
[55.793559, 37.435983],
[55.800584, 37.675638],
[55.716733, 37.589988],
[55.691046, 37.711026],
[55.723123, 37.406067],
[55.843363, 37.778445]
];
$.each(coordinates, function (id, coordinates) {
pickups.features.push({
type: 'Feature',
id: id,
geometry: {type: 'Point', coordinates: coordinates},
properties: {
balloonContentHeader: 'ПВЗ Grastin №' + id,
balloonContentBody: 'Адрес доставки, описание, контакты, время работы.',
balloonContentFooter: 'График работы: пн-сб 10:00-20:00',
clusterCaption: 'ПВЗ Grastin №' + id,
hintContent: 'ПВЗ Grastin №' + id
}
});
});
objManager.add(pickups);
map.setBounds(map.geoObjects.getBounds());
});