N
N
nanny_ogg2016-07-20 10:50:26
Yandex
nanny_ogg, 2016-07-20 10:50:26

How to display hint content on Yandex Maps?

I use the code from the Yandex maps constructor.

ymaps.ready(init);
  function init () {
    var myMap = new ymaps.Map("map", {
        center: [54.318824, 48.396600],
        zoom: 15
      }),
      myPlacemark = new ymaps.Placemark([54.318824, 48.396600], {
        // Чтобы балун и хинт открывались на метке, необходимо задать ей определенные свойства.
        hintContent: "Хинт метки"
      });

    myMap.geoObjects.add(myPlacemark);

    // Показываем хинт на карте (без привязки к геообъекту).
    myMap.hint.show(myMap.getCenter(), "Содержимое хинта", {
      // Опция: задержка перед открытием.
      showTimeout: 1500
    });
  }

Displays everything correctly, the only problem is that the label description is not displayed. An empty white pop-up window is displayed. What could be the problem?

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