Made use of mapzoomout+mapzoomin on all maptypes + simplified the client code of the individual maps.
This commit is contained in:
parent
f0a043b41c
commit
85a49eb934
4 changed files with 59 additions and 79 deletions
|
|
@ -22,7 +22,17 @@ var HDMapType = DynmapTileLayer.extend({
|
|||
this.projection = new HDProjection($.extend({map: this}, options));
|
||||
},
|
||||
getTileName: function(tilePoint, zoom) {
|
||||
return namedReplace('{prefix}{nightday}/{scaledx}_{scaledy}/{zoom}{x}_{y}.png', this.getTileInfo(tilePoint, zoom));
|
||||
var info = this.getTileInfo(tilePoint, zoom);
|
||||
// Y is inverted for HD-map.
|
||||
info.y = -info.y;
|
||||
info.scaledy = info.y >> 5;
|
||||
return namedReplace('{prefix}{nightday}/{scaledx}_{scaledy}/{zoom}{x}_{y}.png', info);
|
||||
},
|
||||
zoomprefix: function(amount) {
|
||||
// amount == 0 -> ''
|
||||
// amount == 1 -> 'z_'
|
||||
// amount == 2 -> 'zz_'
|
||||
return 'zzzzzzzzzzzzzzzzzzzzzz'.substr(0, amount) + (amount === 0 ? '' : '_');
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue