From 2b8426fb47e6c2cbed41afbcf5831d0049293e4c Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 12 Aug 2014 17:48:22 +0200 Subject: [PATCH 1/2] Fix incorrect maximum extent in xyz-retina example --- examples/xyz-retina.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/xyz-retina.js b/examples/xyz-retina.js index b185ede90a..f290b189a8 100644 --- a/examples/xyz-retina.js +++ b/examples/xyz-retina.js @@ -22,11 +22,10 @@ var map = new ol.Map({ source: new ol.source.OSM() }), new ol.layer.Tile({ + extent: ol.proj.transformExtent(mapExtent, 'EPSG:4326', 'EPSG:3857'), source: new ol.source.XYZ({ url: 'http://tileserver.maptiler.com/grandcanyon@2x/{z}/{x}/{y}.png', tilePixelRatio: 2, // THIS IS IMPORTANT - maxExtent: ol.proj.transformExtent( - mapExtent, 'EPSG:4326', 'EPSG:3857'), minZoom: mapMinZoom, maxZoom: mapMaxZoom }) From 3b817d8db3502aae738971fa0d8d5c99d4c8ee2a Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 12 Aug 2014 18:07:53 +0200 Subject: [PATCH 2/2] Fix attribution in xyz-retina example --- examples/xyz-retina.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/xyz-retina.js b/examples/xyz-retina.js index f290b189a8..1eecdfebe0 100644 --- a/examples/xyz-retina.js +++ b/examples/xyz-retina.js @@ -8,7 +8,8 @@ goog.require('ol.source.XYZ'); var attribution = new ol.Attribution({ - html: 'Tiles rendered with © USGS' + html: 'Tiles © USGS, rendered with ' + + 'MapTiler' }); var mapMinZoom = 1; @@ -24,6 +25,7 @@ var map = new ol.Map({ new ol.layer.Tile({ extent: ol.proj.transformExtent(mapExtent, 'EPSG:4326', 'EPSG:3857'), source: new ol.source.XYZ({ + attributions: [attribution], url: 'http://tileserver.maptiler.com/grandcanyon@2x/{z}/{x}/{y}.png', tilePixelRatio: 2, // THIS IS IMPORTANT minZoom: mapMinZoom,