D
D
Dmitry Markov2020-07-29 17:44:11
JavaScript
Dmitry Markov, 2020-07-29 17:44:11

Why don't balloons open when clicking on a label with a custom view?

Hello.
Why don't balloons open when clicking on a label with a custom view?
Here is the code:

I initialize the katra

this.ymap = new ymaps.Map(this.details.map.id, {
      center: [39.891523,59.220496],
      zoom: this.details.zoom,
      controls: this.details.controls
    })
    this.objectManager = new ymaps.ObjectManager({
      clusterize: true
    });


I style the label
this.objectManager.clusters.options.set({
      preset: 'islands#invertedDarkOrangeClusterIcons'
    });
    this.objectManager.objects.options.set({
      iconLayout: 'default#image',
      iconImageHref: this.details.marker.icon,
      iconImageSize: [this.details.marker.width, this.details.marker.height],
      iconImageOffset: [(this.details.marker.width / 2 * -1), (this.details.marker.height * -1)]
    });


Add markers to the map
let myPlacemarks = {
      type: "FeatureCollection",
      features: []
    };
      myPlacemarks.features.push({
        type: "Feature",
        id: index,
        geometry: {
          type: "Point",
          coordinates: [parseFloat(lat), parseFloat(lon)]
        },
        properties: {
          balloonContentHeader: `Балун Титле`,
          balloonContentBody: `Балун Контент`
        }
      });


And when you click the balloon does not open. If you return the default view to the label, everything works.

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