lib/mbtiles.js
function tms2zxy(zxys) {
        return zxys.split(',').map(function(tms) {
            var zxy = tms.split('/').map(function(v) { return parseInt(v, 10); });
            zxy[2] = (1 << zxy[0]) - 1 - zxy[2];
            return zxy.join('/');
        });
    }
function tms2zxy(zxys) {
        return zxys.split(',').map(function(tms) {
            var zxy = tms.split('/').map(function(v) { return parseInt(v, 10); });
            zxy[2] = (1 << zxy[0]) - 1 - zxy[2];
            return zxy.join('/');
        });
    }
function tms2zxy ( zxys ) { return zxys . split ( ',' ) . map ( function ( tms ) { var zxy = tms . split ( '/' ) . map ( function ( v ) { return parseInt ( v , 10 ) ; } ) ; zxy [ 2 ] = ( 1 << zxy [ 0 ] ) - 1 - zxy [ 2 ] ; return zxy . join ( '/' ) ; } ) ; }
Converts MBTiles native TMS coords to ZXY.
Converts MBTiles native TMS coords to ZXY .