diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-11-11 16:29:14 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-11-11 16:29:14 +0000 |
commit | 3ca55b28bb78d781824b88d333a38bfd598f8a16 (patch) | |
tree | 58294f2d66e8abd53f3e197dfc525818be71f1a8 /web/js/map-bing-ol.js | |
parent | 84d178250f52e53f66d7f6ec331fde8076ffe0e4 (diff) |
Don't request tiles at level they don't exist.
Diffstat (limited to 'web/js/map-bing-ol.js')
-rw-r--r-- | web/js/map-bing-ol.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/web/js/map-bing-ol.js b/web/js/map-bing-ol.js index 391f837c6..9f8dc9599 100644 --- a/web/js/map-bing-ol.js +++ b/web/js/map-bing-ol.js @@ -88,11 +88,13 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, { "http://c.tilma.mysociety.org/sv/${z}/${x}/${y}.png" ]; } else { + var type = ''; + if (z > 10) type = '&productSet=mmOS'; var url = [ - "http://ecn.t0.tiles.virtualearth.net/tiles/r${id}.png?g=701&productSet=mmOS", - "http://ecn.t1.tiles.virtualearth.net/tiles/r${id}.png?g=701&productSet=mmOS", - "http://ecn.t2.tiles.virtualearth.net/tiles/r${id}.png?g=701&productSet=mmOS", - "http://ecn.t3.tiles.virtualearth.net/tiles/r${id}.png?g=701&productSet=mmOS" + "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, + "http://ecn.t2.tiles.virtualearth.net/tiles/r${id}.png?g=701" + type, + "http://ecn.t3.tiles.virtualearth.net/tiles/r${id}.png?g=701" + type, ]; } var s = '' + x + y + z; |