From e97b2d35d472a20778d20c3bd3d7bf36c4901cd8 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Thu, 19 Sep 2013 16:07:11 +0200 Subject: [PATCH 1/2] Add missing source attribution in xyz-esri example --- examples/xyz-esri.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/xyz-esri.js b/examples/xyz-esri.js index aede312ea2..b1700b640f 100644 --- a/examples/xyz-esri.js +++ b/examples/xyz-esri.js @@ -1,3 +1,4 @@ +goog.require('ol.Attribution'); goog.require('ol.Map'); goog.require('ol.RendererHint'); goog.require('ol.View2D'); @@ -6,11 +7,17 @@ goog.require('ol.proj'); goog.require('ol.source.XYZ'); +var attribution = new ol.Attribution({ + html: 'Tiles © ArcGIS' +}); + 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}' }) From 5c15c18f1a39d6262d5305e8b374fd49b67dae1b Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Thu, 19 Sep 2013 17:23:20 +0200 Subject: [PATCH 2/2] Remove xyz-seturl example --- examples/xyz-seturl.html | 58 ---------------------------------------- examples/xyz-seturl.js | 34 ----------------------- 2 files changed, 92 deletions(-) delete mode 100644 examples/xyz-seturl.html delete mode 100644 examples/xyz-seturl.js diff --git a/examples/xyz-seturl.html b/examples/xyz-seturl.html deleted file mode 100644 index 1b09fd9618..0000000000 --- a/examples/xyz-seturl.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - SetURL example - - - - - -
- -
-
-
- - - - - -
-
- -
- -
-

XYZ set URL example

-

Example of a setting the URL on an XYZ source

-
-

See the xyz-seturl.js source to see how this is done.

-
-
xyz, seturl
-
- -
- -
- - - - - - - diff --git a/examples/xyz-seturl.js b/examples/xyz-seturl.js deleted file mode 100644 index f412819514..0000000000 --- a/examples/xyz-seturl.js +++ /dev/null @@ -1,34 +0,0 @@ -goog.require('ol.Map'); -goog.require('ol.RendererHints'); -goog.require('ol.View2D'); -goog.require('ol.layer.Tile'); -goog.require('ol.source.XYZ'); - - -var source = new ol.source.XYZ({ - url: 'http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png' -}); -var map = new ol.Map({ - layers: [ - new ol.layer.Tile({ - source: source - }) - ], - renderers: ol.RendererHints.createFromQueryData(), - target: 'map', - view: new ol.View2D({ - center: [0, 0], - zoom: 4 - }) -}); - -$('#set-stamen').click(function() { - source.setUrl('http://{a-d}.tile.stamen.com/watercolor/{z}/{x}/{y}.jpg'); -}); -$('#set-opencyclemap').click(function() { - source.setUrl('http://{a-c}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png'); -}); -$('#set-esri').click(function() { - source.setUrl('http://server.arcgisonline.com/ArcGIS/rest/services/' + - 'World_Topo_Map/MapServer/tile/{z}/{y}/{x}'); -});