1 | goog.require('ol.Map');
|
2 | goog.require('ol.View');
|
3 | goog.require('ol.layer.Tile');
|
4 | goog.require('ol.proj');
|
5 | goog.require('ol.source.XYZ');
|
6 |
|
7 |
|
8 | var map = new ol.Map({
|
9 | target: 'map',
|
10 | layers: [
|
11 | new ol.layer.Tile({
|
12 | source: new ol.source.XYZ({
|
13 | attributions: 'Tiles © <a href="https://services.arcgisonline.com/ArcGIS/' +
|
14 | 'rest/services/World_Topo_Map/MapServer">ArcGIS</a>',
|
15 | url: 'https://server.arcgisonline.com/ArcGIS/rest/services/' +
|
16 | 'World_Topo_Map/MapServer/tile/{z}/{y}/{x}'
|
17 | })
|
18 | })
|
19 | ],
|
20 | view: new ol.View({
|
21 | center: ol.proj.fromLonLat([-121.1, 47.5]),
|
22 | zoom: 7
|
23 | })
|
24 | });
|