Permalink
Browse files

bing: Use Math.abs in subdomains check (fixes #31)

  • Loading branch information...
1 parent f67cc92 commit d74d67df29812665357bb3c3a1e488abee35b6f9 Pavel Shramov committed Sep 29, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 layer/tile/Bing.js
View
2 layer/tile/Bing.js
@@ -30,7 +30,7 @@ L.BingLayer = L.TileLayer.extend({
getTileUrl: function(p, z) {
var z = this._getZoomForUrl();
var subdomains = this.options.subdomains,
- s = this.options.subdomains[(p.x + p.y) % subdomains.length];
+ s = this.options.subdomains[Math.abs((p.x + p.y) % subdomains.length)];
return this._url.replace('{subdomain}', s)
.replace('{quadkey}', this.tile2quad(p.x, p.y, z))
.replace('{culture}', this.options.culture);

0 comments on commit d74d67d

Please sign in to comment.