From 9f19ccf50c3ef7ff98566fa3731a71590c1c9975 Mon Sep 17 00:00:00 2001 From: FrozenCow Date: Fri, 22 Jul 2011 18:25:20 +0200 Subject: [PATCH] Removed old comments. --- web/js/flatmap.js | 74 ----------------------------------------------- 1 file changed, 74 deletions(-) diff --git a/web/js/flatmap.js b/web/js/flatmap.js index c32c9682..d740b4c6 100644 --- a/web/js/flatmap.js +++ b/web/js/flatmap.js @@ -47,78 +47,4 @@ var FlatMapType = DynmapTileLayer.extend({ } }); -/* -function FlatMapType(configuration) { - $.extend(this, configuration); } -FlatMapType.prototype = $.extend(new DynMapType(), { - constructor: FlatMapType, - projection: new FlatProjection(), - tileSize: 128.0, - minZoom: 0, - maxZoom: 3, - prefix: null, - getTile: function(coord, zoom, doc) { - var tileSize = 128; - var imgSize; - var tileName; - - var dnprefix = ''; - if(this.dynmap.map.mapTypes[this.dynmap.map.mapTypeId].nightandday && this.dynmap.serverday) - dnprefix = '_day'; - var extrazoom = this.dynmap.world.extrazoomout; - if(zoom < extrazoom) { - var scale = 1 << (extrazoom-zoom); - var zprefix = "zzzzzzzzzzzz".substring(0, extrazoom-zoom); - if(this.dynmap.map.mapTypes[this.dynmap.map.mapTypeId].bigmap) - tileName = this.prefix + dnprefix + '_128/' + ((scale*coord.x) >> 5) + '_' + ((scale*coord.y) >> 5) + - '/' + zprefix + "_" + (scale*coord.x) + '_' + (scale*coord.y) + '.png'; - else - tileName = zprefix + this.prefix + dnprefix + '_128_' + (scale*coord.x) + '_' + (scale*coord.y) + '.png'; - imgSize = 128; - } - else { - if(this.dynmap.map.mapTypes[this.dynmap.map.mapTypeId].bigmap) - tileName = this.prefix + dnprefix + '_128/' + (coord.x >> 5) + '_' + (coord.y >> 5) + - '/' + coord.x + '_' + coord.y + '.png'; - else - tileName = this.prefix + dnprefix + '_128_' + coord.x + '_' + coord.y + '.png'; - imgSize = Math.pow(2, 7+zoom-extrazoom); - } - var tile = $('
') - .addClass('tile') - .css({ - width: tileSize + 'px', - height: tileSize + 'px' - }); - var img = $('') - .attr('src', this.dynmap.getTileUrl(tileName)) - .error(function() { img.hide(); }) - .bind('load', function() { img.show(); }) - .css({ - width: imgSize +'px', - height: imgSize + 'px', - borderStyle: 'none' - }) - .hide() - .appendTo(tile); - this.dynmap.registerTile(this, tileName, img); - //this.dynmap.unregisterTile(this, tileName); - return tile.get(0); - }, - updateTileSize: function(zoom) { - var size; - var extrazoom = this.dynmap.world.extrazoomout; - var mapzoomin = this.mapzoomin; - this.projection.extrazoom = extrazoom; - this.maxZoom = mapzoomin + extrazoom; - if (zoom <= extrazoom) { - size = 128; - } - else { - size = Math.pow(2, 7+zoom-extrazoom); - } - this.tileSize = size; - } -}); -*/ maptypes.FlatMapType = function(options) { return new FlatMapType(options); }; \ No newline at end of file