E
E
Emmet12021-04-05 21:59:25
JavaScript
Emmet1, 2021-04-05 21:59:25

How to make your own design of balloons, with multiple display of points on the map?

I display a lot of labels on the map using JSON
. I need the balloons to have their own design /
I don’t quite understand how to do this.

var myMap = new ymaps.Map('map', {
                        center: [55.745, 37.68],
                        zoom: 6
                    }, {
                        searchControlProvider: 'yandex#search'
                    }),
                    objectManager = new ymaps.ObjectManager({
                        iconLayout: 'default#imageWithContent',
                      // Своё изображение иконки метки.
                      iconImageHref: '/img/mark.png',
                        iconImageSize: [48, 48],
            // Смещение левого верхнего угла иконки относительно
            // её "ножки" (точки привязки).
            iconImageOffset: [-24, -24],
            // Смещение слоя с содержимым относительно слоя с картинкой.
            iconContentOffset: [15, 15]
                    });


                objectManager.objects.options.set('preset', 'islands#greenDotIcon');
                objectManager.clusters.options.set('preset', 'islands#greenClusterIcons');
                myMap.geoObjects.add(objectManager);
                myMap.behaviors.disable('scrollZoom');

                $.ajax({
                    url: "/maps-point/"
                }).done(function(data) {
                    objectManager.add(data);
                });

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question