mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-07-25 15:38:54 +00:00
Fix formatting
This commit is contained in:
@ -512,14 +512,14 @@ describe('TileLayer', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('#getTileUrl', function () {
|
describe('#getTileUrl', () => {
|
||||||
it('can call with static coords', function () {
|
it('can call with static coords', () => {
|
||||||
// Layer is not added to the map
|
// Layer is not added to the map
|
||||||
var layer = L.tileLayer('http://example.com/{z}/{x}/{y}.png');
|
const layer = new TileLayer('http://example.com/{z}/{x}/{y}.png');
|
||||||
var url = layer.getTileUrl({z: 1, x: 2, y: 3});
|
let url = layer.getTileUrl({z: 1, x: 2, y: 3});
|
||||||
expect(url).to.equal('http://example.com/1/2/3.png');
|
expect(url).to.equal('http://example.com/1/2/3.png');
|
||||||
layer.addTo(map)
|
layer.addTo(map);
|
||||||
var url = layer.getTileUrl({z: 1, x: 2, y: 3});
|
url = layer.getTileUrl({z: 1, x: 2, y: 3});
|
||||||
expect(url).to.equal('http://example.com/1/2/3.png');
|
expect(url).to.equal('http://example.com/1/2/3.png');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -210,7 +210,7 @@ export const TileLayer = GridLayer.extend({
|
|||||||
e.tile.onload = null;
|
e.tile.onload = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
_getZoomForUrl: function (zoom) {
|
_getZoomForUrl(zoom) {
|
||||||
const maxZoom = this.options.maxZoom,
|
const maxZoom = this.options.maxZoom,
|
||||||
zoomReverse = this.options.zoomReverse,
|
zoomReverse = this.options.zoomReverse,
|
||||||
zoomOffset = this.options.zoomOffset;
|
zoomOffset = this.options.zoomOffset;
|
||||||
|
Reference in New Issue
Block a user