protected String quadTree ( final long pMapTileIndex ) { final StringBuilder quadKey = new StringBuilder ( ) ; for ( int i = MapTileIndex . getZoom ( pMapTileIndex ) ; i > 0 ; i -- ) { int digit = 0 ; final int mask = 1 << ( i - 1 ) ; if ( ( MapTileIndex . getX ( pMapTileIndex ) & mask ) != 0 ) digit += 1 ; if ( ( MapTileIndex . getY ( pMapTileIndex ) & mask ) != 0 ) digit += 2 ; quadKey . append ( "" + digit ) ; } return quadKey . toString ( ) ; }
Converts TMS tile coordinates to QuadTree