diff options
author | Dave Arter <davea@mysociety.org> | 2015-07-30 13:26:09 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2015-08-28 14:27:16 +0100 |
commit | df13501f23a5673b1d560fd7f0ec3c158897693c (patch) | |
tree | a181da0838991bd86a1050f2df30b64ffef2ef66 /www/js/map-bing-ol.js | |
parent | 7f3902a5fe0874e32e078de6e8ab9a6b34d8bef1 (diff) |
Only switch map tiles to Ordnance Survey at higher zoom levels when CONFIG.isUK is true
Diffstat (limited to 'www/js/map-bing-ol.js')
-rw-r--r-- | www/js/map-bing-ol.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/www/js/map-bing-ol.js b/www/js/map-bing-ol.js index f39cbf8..c349f41 100644 --- a/www/js/map-bing-ol.js +++ b/www/js/map-bing-ol.js @@ -27,7 +27,7 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, { var z = this.map.getZoom() + this.zoomOffset; var copyrights; var logo = ''; - if (z >= 16) { + if (z >= 16 && CONFIG.isUK) { copyrights = 'Contains Ordnance Survey data © Crown copyright and database right 2010'; } else { logo = '<a href="http://www.bing.com/maps/"><img border=0 src="http://dev.virtualearth.net/Branding/logo_powered_by.png"></a>'; @@ -87,7 +87,7 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, { this.map.getZoom() + this.zoomOffset; var url; - if (z >= 16) { + if (z >= 16 && CONFIG.isUK) { url = [ "http://tilma.mysociety.org/sv/${z}/${x}/${y}.png", "http://a.tilma.mysociety.org/sv/${z}/${x}/${y}.png", @@ -96,7 +96,7 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, { ]; } else { var type = ''; - if (z > 10) { type = '&productSet=mmOS'; } + if (z > 10 && CONFIG.isUK) { type = '&productSet=mmOS'; } url = [ "http://ecn.t0.tiles.virtualearth.net/tiles/r${id}.png?g=701" + type, "http://ecn.t1.tiles.virtualearth.net/tiles/r${id}.png?g=701" + type, |