Answer the question
In order to leave comments, you need to log in
How to call the component method from yandex maps?
Tell me how to call the method checkedPoint
from Balloon`a Yandex maps (react-yandex-maps).
The code looks like this:
export class TestMaps extends React.Component {
checkedPoint = (data) => {
console.log(data);
};
render() {
return (
<YMaps>
<Map state={{
center: [55.76, 37.64],
zoom: 11,
}}
width='100%' height='350px'>
<Placemark modules={['geoObject.addon.balloon']}
geometry={[55.76, 37.64]}
properties={{
iconContent: 1,
balloonContentHeader: 'Balloon content header',
balloonContentBody: 'Balloon content body',
balloonContentFooter: '<div class="btn-primary">Выбрать</div>',
}}
/>
</Map>
</YMaps>
)
}
}
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