diff --git a/src/maputils.js b/src/maputils.js index 28a3f17e9..b1b0ea444 100644 --- a/src/maputils.js +++ b/src/maputils.js @@ -45,7 +45,9 @@ const maputils = { tileGrid: function tileGrid(settings, defaultSettings = {}) { const tileGridSettings = Object.assign({}, defaultSettings, settings); const extent = tileGridSettings.extent; - tileGridSettings.origin = tileGridSettings.alignBottomLeft === false ? getTopLeft(extent) : getBottomLeft(extent); + if (!tileGridSettings.origin) { + tileGridSettings.origin = tileGridSettings.alignBottomLeft === false ? getTopLeft(extent) : getBottomLeft(extent); + } return new TileGrid(tileGridSettings); }, checkZoomChange: function checkZoomChange(resolution, currentResolution) {