openlayers3 全屏控件
作者:互联网
<!DOCTYPE html> <html> <head> <title>Full Screen Drag, Rotate, and Zoom</title> <link rel="stylesheet" href="http://openlayers.org/en/v3.13.0/css/ol.css" type="text/css"> <script src="http://openlayers.org/en/v3.13.0/build/ol.js"></script> <style> .map:-moz-full-screen { height: 100%; } .map:-webkit-full-screen { height: 100%; } .map:fullscreen { height: 100%; } /* position the rotate control lower than usual */ .ol-rotate { top: 3em; } </style> </head> <body> <div id="map" class="map"></div> <script> var map = new ol.Map({ controls: ol.control.defaults().extend([ new ol.control.FullScreen() ]), interactions: ol.interaction.defaults().extend([ new ol.interaction.DragRotateAndZoom() ]), layers: [ new ol.layer.Tile({ source: new ol.source.BingMaps({ key: 'Your Bing Maps Key from http://bingmapsportal.com/ here', imagerySet: 'Aerial' }) }) ], // Use the canvas renderer because it's currently the fastest target: 'map', view: new ol.View({ center: [-33519607, 5616436], rotation: -Math.PI / 8, zoom: 8 }) }); </script> </body> </html>
标签:control,控件,openlayers3,ol,map,100%,height,全屏,new 来源: https://www.cnblogs.com/devgis/p/16501529.html