Skip to content

Commit e110c7b

Browse files
committed
safer _getSubdomain
Note that (tilePoint.x + tilePoint.y) might be negative in some cases (custom CRS with tiled WMS).
1 parent a1acaff commit e110c7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/layer/tile/TileLayer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ L.TileLayer = L.Class.extend({
496496
},
497497

498498
_getSubdomain: function (tilePoint) {
499-
var index = (tilePoint.x + tilePoint.y) % this.options.subdomains.length;
499+
var index = Math.abs(tilePoint.x + tilePoint.y) % this.options.subdomains.length;
500500
return this.options.subdomains[index];
501501
},
502502

0 commit comments

Comments
 (0)