UNPKG

639 BJavaScriptView Raw
1goog.require('ol.Map');
2goog.require('ol.View');
3goog.require('ol.layer.Tile');
4goog.require('ol.proj');
5goog.require('ol.source.XYZ');
6
7
8var 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});