Skip to content

Commit

Permalink
stop using point.z entirely
Browse files Browse the repository at this point in the history
  • Loading branch information
jgravois committed Dec 20, 2016
1 parent 42b0982 commit cb8fc5f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Layers/TiledMapLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,14 @@ export var TiledMapLayer = L.TileLayer.extend({
},

getTileUrl: function (tilePoint) {
var zoom = this._getZoomForUrl();

return L.Util.template(this.tileUrl, L.extend({
s: this._getSubdomain(tilePoint),
z: (this._lodMap && this._lodMap[this._getZoomForUrl()]) ? this._lodMap[this._getZoomForUrl()] : tilePoint.z, // try lod map first, then just default to zoom level
x: tilePoint.x,
y: tilePoint.y
y: tilePoint.y,
// try lod map first, then just default to zoom level
z: (this._lodMap && this._lodMap[zoom]) ? this._lodMap[zoom] : zoom
}, this.options));
},

Expand Down

0 comments on commit cb8fc5f

Please sign in to comment.