Support {-y} in tile layer urls (Fixes #4284)
This commit is contained in:
parent
8e2e790933
commit
d5e78e2253
@ -75,11 +75,14 @@ L.TileLayer = L.GridLayer.extend({
|
||||
},
|
||||
|
||||
getTileUrl: function (coords) {
|
||||
var invertedY = this._globalTileRange.max.y - coords.y;
|
||||
|
||||
return L.Util.template(this._url, L.extend({
|
||||
r: L.Browser.retina ? '@2x' : '',
|
||||
s: this._getSubdomain(coords),
|
||||
x: coords.x,
|
||||
y: this.options.tms ? this._globalTileRange.max.y - coords.y : coords.y,
|
||||
y: this.options.tms ? invertedY : coords.y,
|
||||
'-y': invertedY,
|
||||
z: this._getZoomForUrl()
|
||||
}, this.options));
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user