Skip to content

Commit

Permalink
Merge pull request #1359 from OpenGeoscience/smaller-than-tiles
Browse files Browse the repository at this point in the history
fix: Fix pixelmap parameters for images smaller than tiles
  • Loading branch information
manthey authored Jan 3, 2025
2 parents 99b58e3 + efc2b51 commit 9174d2a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/osmLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ var osmLayer = function (arg) {
overlap: m_this._options.tileOverlap,
scale: m_this._options.tileScale,
url: m_this._options.url.call(
m_this, urlParams.x, urlParams.y, urlParams.level || 0,
m_this, urlParams.x, urlParams.y, Math.max(urlParams.level || 0, 0),
m_this._options.subdomains),
crossDomain: m_this._options.crossDomain
});
Expand Down
2 changes: 1 addition & 1 deletion src/pixelmapLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ var pixelmapLayer = function (arg) {
overlap: m_this._options.tileOverlap,
scale: m_this._options.tileScale,
url: m_this._options.url.call(
m_this, urlParams.x, urlParams.y, urlParams.level || 0,
m_this, urlParams.x, urlParams.y, Math.max(urlParams.level || 0, 0),
m_this._options.subdomains),
crossDomain: m_this._options.crossDomain
});
Expand Down
2 changes: 1 addition & 1 deletion src/tileLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ var tileLayer = function (arg) {
size: {x: m_this._options.tileWidth, y: m_this._options.tileHeight},
queue: m_this._queue,
url: m_this._options.url.call(
m_this, urlParams.x, urlParams.y, urlParams.level || 0,
m_this, urlParams.x, urlParams.y, Math.max(urlParams.level || 0, 0),
m_this._options.subdomains)
});
};
Expand Down
1 change: 1 addition & 0 deletions src/util/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ var util = {
};
var layerParams = {
maxLevel: maxLevel,
minLevel: Math.min(0, maxLevel),
wrapX: false,
wrapY: false,
tileOffset: function () {
Expand Down

0 comments on commit 9174d2a

Please sign in to comment.