JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://api-maps.yandex.ru/2.1-dev/?lang=ru-RU"></script>
<div id=map></div>
<div id=background></div>
CSS
html, body, #map {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
#map { margin-top: 30px; position: absolute; top: 0px left: 0px; }
#background {
background-color: green;
width: 100%;
height: 100%;
}
JavaScript
// Подробнее http://api.yandex.ru/maps/
ymaps.ready(function () {
var map = new ymaps.Map('map', {
center: [55.751432, 37.716621],
zoom: 10,
controls: ['fullscreenControl']
});
map.events.add('click', function () {
alert('1');
});
document.getElementById('background').addEventListener('click', function () {
alert('2');
});
});