map.on('click', function(evt){ coordinate = evt.coordinate; overlay.setPosition(coordinate); var v= (document.getElementById('bild-switch_2').checked)? 45 - coordinate[0] : coordinate[0]; content.innerHTML = '

You clicked here:


x: ' +v.toFixed(2) +' m
y: '+ coordinate[1].toFixed(2) + ' m'; container.style.display = 'block'; });