B
B
Bogdan Glushko2019-08-12 00:45:29
Yandex maps
Bogdan Glushko, 2019-08-12 00:45:29

How to assign events to a point on a Yandex map?

myPlacemarkWithContent3 = new ymaps.Placemark([55.761599, 37.663877], {
            hintContent: 'Собственный значок метки с контентом',
            //balloonContent: 'А эта — новогодняя',
            iconContent: '0,00 Га 15230 м²'
        }, {
            // Опции.
            // Необходимо указать данный тип макета.
            iconLayout: 'default#imageWithContent',
            // Своё изображение иконки метки.
            iconImageHref: 'images/ball_hover.png',
            // Размеры метки.
            iconImageSize: [72, 54],
            // Смещение левого верхнего угла иконки относительно
            // её "ножки" (точки привязки).
            iconImageOffset: [0, -54],
            // Смещение слоя с содержимым относительно слоя с картинкой.
            iconContentOffset: [0, 0],
            // Макет содержимого.
            iconContentLayout: MyIconContentLayout
        });

How to assign mouse events to this point?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2019-08-12
@bogdan19930903

I answered your previous question , with a working example on CodePen
where I gave a visual example for the mouseenter and mouseleave events . (Yes, the question is formulated differently, but in the code the answer to both questions. It seems that you didn’t even look at the code)
What didn’t suit you in that answer, why are you creating a new question?

myPlacemark.events
  .add('mouseenter', function (e) { // mouseenter, mouseleave etc...
    \\ you code here
  })

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question