Files
openlayers/examples/resources/external-map-map.html
Maximilian Krög 8cff620691 Improve unusable map window
As long as the original window is visible animation frames will run
and the external map will be usable
2021-11-02 00:21:12 +01:00

45 lines
1018 B
HTML

<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/ol.css" type="text/css">
<style>
body {
margin: 0;
}
.container {
position: relative;
height: 100%;
width: 100%;
}
#unusable-overlay,
.map {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
}
.unusable #unusable-overlay {
background-color: rgba(0, 0, 0, .7);
font-size: 3rem;
font-weight: bold;
color: white;
display: flex;
align-items: center;
user-select: none;
justify-content: center;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.unusable .map .ol-control {
display: none;
}
</style>
</head>
<body class="container">
<div id="map" class="map"></div>
<div id="unusable-overlay" hidden>
<span>Map not usable</span>
</div>
</body>
</html>