Files
openlayers/examples/resources/external-map-map.html
andrewcoder002 c799cf0cfd Update external-map-map.html
Handle situation when user reloads external map window
2021-11-02 00:21:10 +01:00

23 lines
591 B
HTML

<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../css/ol.css" type="text/css">
<style>
body {
margin: 0;
}
.map {
height: 100%;
width: 100%;
}
</style>
</head>
<body>
<script type="text/javascript">
if ((window.performance.navigation && window.performance.navigation.type === 1) || window.performance.getEntriesByType('navigation').map((nav) => nav.type).includes('reload'))
window.close();
</script>
<div id="map" class="map" tabindex="0"></div>
</body>
</html>