Skip to content

Commit

Permalink
Merge pull request #1381 from mvtm-dn/master
Browse files Browse the repository at this point in the history
Fix lod value 0 issue
  • Loading branch information
gavinr-maps committed Nov 21, 2023
2 parents fea26ff + c236b95 commit 44e324e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Layers/TiledMapLayer.js
Expand Up @@ -73,7 +73,7 @@ export var TiledMapLayer = TileLayer.extend({
x: tilePoint.x,
y: tilePoint.y,
// try lod map first, then just default to zoom level
z: (this._lodMap && this._lodMap[zoom]) ? this._lodMap[zoom] : zoom
z: (this._lodMap && this._lodMap[zoom] !== undefined) ? this._lodMap[zoom] : zoom
}, this.options));
},

Expand All @@ -95,7 +95,7 @@ export var TiledMapLayer = TileLayer.extend({

// if there is no lod map or an lod map with a proper zoom load the tile
// otherwise wait for the lod map to become available
if (!this._lodMap || (this._lodMap && this._lodMap[this._getZoomForUrl()])) {
if (!this._lodMap || (this._lodMap && this._lodMap[this._getZoomForUrl()] !== undefined)) {
tile.src = this.getTileUrl(coords);
} else {
this.once('lodmap', function () {
Expand Down

0 comments on commit 44e324e

Please sign in to comment.