1 | goog.require('ol.Map');
|
2 | goog.require('ol.View');
|
3 | goog.require('ol.control');
|
4 | goog.require('ol.control.ZoomToExtent');
|
5 | goog.require('ol.layer.Tile');
|
6 | goog.require('ol.source.OSM');
|
7 |
|
8 |
|
9 | var map = new ol.Map({
|
10 | controls: ol.control.defaults({
|
11 | attributionOptions: {
|
12 | collapsible: false
|
13 | }
|
14 | }).extend([
|
15 | new ol.control.ZoomToExtent({
|
16 | extent: [
|
17 | 813079.7791264898, 5929220.284081122,
|
18 | 848966.9639063801, 5936863.986909639
|
19 | ]
|
20 | })
|
21 | ]),
|
22 | layers: [
|
23 | new ol.layer.Tile({
|
24 | source: new ol.source.OSM()
|
25 | })
|
26 | ],
|
27 | target: 'map',
|
28 | view: new ol.View({
|
29 | center: [0, 0],
|
30 | zoom: 2
|
31 | })
|
32 | });
|