Delete center if center zoom is NaN.
This commit is contained in:
+1
-1
@@ -400,7 +400,7 @@ MBTiles.prototype.getInfo = function(callback) {
|
|||||||
(info.bounds[3] - info.bounds[1]) / 2 + info.bounds[1],
|
(info.bounds[3] - info.bounds[1]) / 2 + info.bounds[1],
|
||||||
(range <= 1) ? info.maxzoom : Math.floor(range * 0.5) + info.minzoom
|
(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;
|
delete info.center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user