mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-08-16 16:45:22 +00:00
TileLayer rounds fractional zoom in url to integer {z} (#8613)
Co-authored-by: Florian Bischof <design.falke@gmail.com>
This commit is contained in:
@ -224,8 +224,8 @@ export const TileLayer = GridLayer.extend({
|
||||
_getZoomForUrl() {
|
||||
let zoom = this._tileZoom;
|
||||
const maxZoom = this.options.maxZoom,
|
||||
zoomReverse = this.options.zoomReverse,
|
||||
zoomOffset = this.options.zoomOffset;
|
||||
zoomReverse = this.options.zoomReverse,
|
||||
zoomOffset = this.options.zoomOffset;
|
||||
|
||||
if (zoomReverse) {
|
||||
zoom = maxZoom - zoom;
|
||||
@ -281,6 +281,10 @@ export const TileLayer = GridLayer.extend({
|
||||
}
|
||||
|
||||
return GridLayer.prototype._tileReady.call(this, coords, err, tile);
|
||||
},
|
||||
|
||||
_clampZoom(zoom) {
|
||||
return Math.round(GridLayer.prototype._clampZoom.call(this, zoom));
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user