Answer the question
In order to leave comments, you need to log in
How to set a custom type of clusterer for Yandex maps built on the basis of the label class?
Hello. Can you please tell me how to make a custom view clusterer icon based on a class (or something else)? You can't post a picture for a number of reasons. You need the html content.
var squareLayout = ymaps.templateLayoutFactory.createClass("<div class='marker-label'>"
+ "<div class='marker-label__head'></div>"
+ "<div class='marker-label__body'></div>"
+ "</div>", {
build: function () {
squareLayout.superclass.build.call(this);
this._events = ymaps.domEvent.manager.group(this.getElement());
this._events.add('click', function () {
alert(this.getData().geometry.getCoordinates());
}, this);
},
clear: function () {
this._events.removeAll();
squareLayout.superclass.clear.call(this);
}
});
new ymaps.Placemark(
[25, 15], {}, {
iconLayout: squareLayout,
iconPane: 'overlaps'
}
);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question