source: binary-improvements/webserver/js/leaflet.layer.sdtdtiles.js@ 295

Last change on this file since 295 was 249, checked in by alloc, 9 years ago

Fixes: Web v8

File size: 608 bytes
RevLine 
[249]1function GetSdtdTileLayer (mapinfo, initTime, isMiniMap) {
2 if (typeof isMiniMap == 'undefined') isMiniMap = false;
3
4 var tileLayer = L.tileLayer('../map/{z}/{x}/{y}.png?t={time}', {
5 maxZoom: isMiniMap ? mapinfo.maxzoom : mapinfo.maxzoom + 1,
6 minZoom: isMiniMap ? 0 : Math.max(0, mapinfo.maxzoom - 5),
7 maxNativeZoom: mapinfo.maxzoom,
8 tileSize: mapinfo.tilesize,
9 continuousWorld: true,
10 tms: true,
11 unloadInvisibleTiles: false,
12 time: initTime
13 });
14
15 // TileLayer w/ TMS=true fix for zoomlevel >= 8
16 tileLayer._getWrapTileNum = function () {
17 return L.point(0, 0);
18 };
19
20 return tileLayer;
21}
22
Note: See TracBrowser for help on using the repository browser.