Answer the question
In order to leave comments, you need to log in
How to hang an event handler on Placemark Yandex maps?
Hello everyone, I have this Placemark :
<Placemark
geometry={coordinates[i]}
properties={{
iconContent: `Название кофейни`,
balloonContent: "421412",
iconCaption: `Назнавие<strong>${cofeePlaces[i]?.name}</strong>`,
}}
options={{
preset: "islands#darkGreenCircleIcon",
iconCaptionMaxWidth: "250",
iconLayout: MyIconContentLayout,
iconContentLayout: MyIconContentLayout,
}}
/>
);
})}
const MyIconContentLayout = ymaps.templateLayoutFactory.createClass(
`<div id="map_point" class="text">
<img src="https://cdn1.iconfinder.com/data/icons/bistro-restaurant-part-i/64/bistro-and-restaurant_53-30.png">
<div class="place_title">
<div>${cofeePlaces[i]?.name}</div>
<div>
<img src="https://cdn1.iconfinder.com/data/icons/interface-travel-and-environment/64/star-interface-256.png" style="width:12px;heigth:12px">
<span class="text_small">
4,5 Капучино от 190 р
</span>
</div>
</div>
</div>`
);
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