此示例演示如何使用其支持的选项自定义overviewmap控件以及定义自定义CSS。您还可以使用shift键旋转地图,以查看总览图的反应方式
<!DOCTYPE html><html>
<head>
<title>Custom Overview Map</title>
<link rel="stylesheet" href="https://openlayers.org/en/v5.1.3/css/ol.css" type="text/css">
<!-- The line below is only needed for old environments like Internet Explorer and Android 4.x -->
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>
<style>
.ol-custom-overviewmap,
.ol-custom-overviewmap.ol-uncollapsible {
bottom: auto;
left: auto;
right: 0;
<