34 lines
867 B
JavaScript
34 lines
867 B
JavaScript
goog.require('ol.Map');
|
|
goog.require('ol.View2D');
|
|
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: 'Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3',
|
|
imagerySet: 'Aerial'
|
|
})
|
|
})
|
|
],
|
|
// Use the canvas renderer because it's currently the fastest
|
|
target: 'map',
|
|
view: new ol.View2D({
|
|
center: [-33519607, 5616436],
|
|
rotation: -Math.PI / 8,
|
|
zoom: 8
|
|
})
|
|
});
|