UNPKG

openlayers

Version:

Build tools and sources for developing OpenLayers based mapping applications

34 lines (31 loc) 863 B
goog.require('ol.Map'); goog.require('ol.View'); goog.require('ol.control'); goog.require('ol.control.FullScreen'); goog.require('ol.interaction'); goog.require('ol.interaction.DragRotateAndZoom'); goog.require('ol.layer.Tile'); goog.require('ol.source.BingMaps'); 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: 'As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5', 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 }) });