Delete center if center zoom is NaN.

This commit is contained in:
Will White
2011-08-26 13:34:06 -04:00
parent 804aabae74
commit 856c83993c

View File

@@ -400,7 +400,7 @@ MBTiles.prototype.getInfo = function(callback) {
(info.bounds[3] - info.bounds[1]) / 2 + info.bounds[1],
(range <= 1) ? info.maxzoom : Math.floor(range * 0.5) + info.minzoom
];
if (info.center && (info.center.length !== 3 || info.center[0] === null)) {
if (info.center && (info.center.length !== 3 || info.center[0] === null || isNaN(info.center[2]))) {
delete info.center;
}