diff --git a/src/Info.cpp b/src/Info.cpp index 913c0f2..55c1156 100644 --- a/src/Info.cpp +++ b/src/Info.cpp @@ -54,7 +54,7 @@ void Info::writeJSON(const char *filename) const { std::tie(minX, maxX, minZ, maxZ) = getBounds(level); std::fprintf(f, "{"); - std::fprintf(f, "\"info\":{"); + std::fprintf(f, "\"bounds\":{"); std::fprintf(f, "\"minX\":%i,", minX); std::fprintf(f, "\"maxX\":%i,", maxX); std::fprintf(f, "\"minZ\":%i,", minZ); diff --git a/viewer/MinedMap.js b/viewer/MinedMap.js index 8eb4b1f..0ced720 100644 --- a/viewer/MinedMap.js +++ b/viewer/MinedMap.js @@ -60,8 +60,8 @@ var MinedMapLayer = L.GridLayer.extend({ var mipmap = this.mipmaps[z]; - if (coords.x >= mipmap.info.minX && coords.x <= mipmap.info.maxX && - coords.y >= mipmap.info.minZ && coords.y <= mipmap.info.maxZ && + if (coords.x >= mipmap.bounds.minX && coords.x <= mipmap.bounds.maxX && + coords.y >= mipmap.bounds.minZ && coords.y <= mipmap.bounds.maxZ && contains(mipmap.regions[coords.y] || [], coords.x)) tile.src = 'data/'+this.layer+'/'+z+'/r.'+coords.x+'.'+coords.y+'.png'; @@ -190,8 +190,8 @@ window.createMap = function () { maxZoom: 3, crs: L.CRS.Simple, maxBounds: [ - [-512*(mipmaps[0].info.maxZ+1), 512*mipmaps[0].info.minX], - [-512*mipmaps[0].info.minZ, 512*(mipmaps[0].info.maxX+1)], + [-512*(mipmaps[0].bounds.maxZ+1), 512*mipmaps[0].bounds.minX], + [-512*mipmaps[0].bounds.minZ, 512*(mipmaps[0].bounds.maxX+1)], ], });