Add missing source attribution in xyz-esri example
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
goog.require('ol.Attribution');
|
||||||
goog.require('ol.Map');
|
goog.require('ol.Map');
|
||||||
goog.require('ol.RendererHint');
|
goog.require('ol.RendererHint');
|
||||||
goog.require('ol.View2D');
|
goog.require('ol.View2D');
|
||||||
@@ -6,11 +7,17 @@ goog.require('ol.proj');
|
|||||||
goog.require('ol.source.XYZ');
|
goog.require('ol.source.XYZ');
|
||||||
|
|
||||||
|
|
||||||
|
var attribution = new ol.Attribution({
|
||||||
|
html: 'Tiles © <a href="http://services.arcgisonline.com/ArcGIS/' +
|
||||||
|
'rest/services/World_Topo_Map/MapServer">ArcGIS</a>'
|
||||||
|
});
|
||||||
|
|
||||||
var map = new ol.Map({
|
var map = new ol.Map({
|
||||||
target: 'map',
|
target: 'map',
|
||||||
layers: [
|
layers: [
|
||||||
new ol.layer.Tile({
|
new ol.layer.Tile({
|
||||||
source: new ol.source.XYZ({
|
source: new ol.source.XYZ({
|
||||||
|
attributions: [attribution],
|
||||||
url: 'http://server.arcgisonline.com/ArcGIS/rest/services/' +
|
url: 'http://server.arcgisonline.com/ArcGIS/rest/services/' +
|
||||||
'World_Topo_Map/MapServer/tile/{z}/{y}/{x}'
|
'World_Topo_Map/MapServer/tile/{z}/{y}/{x}'
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user