Files
openlayers/nicer-api-docs/examples/xyz-esri.js
2014-05-06 13:02:46 -05:00

22 lines
590 B
JavaScript

var attribution = new ol.Attribution({
html: 'Tiles &copy; <a href="http://services.arcgisonline.com/ArcGIS/' +
'rest/services/World_Topo_Map/MapServer">ArcGIS</a>'
});
var map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Tile({
source: new ol.source.XYZ({
attributions: [attribution],
url: 'http://server.arcgisonline.com/ArcGIS/rest/services/' +
'World_Topo_Map/MapServer/tile/{z}/{y}/{x}'
})
})
],
view: new ol.View2D({
center: ol.proj.transform([-121.1, 47.5], 'EPSG:4326', 'EPSG:3857'),
zoom: 7
})
});