Examples of closestZoom()


Examples of org.geotools.mbtiles.MBTilesFile.closestZoom()

            zoomLevel = Math.round(Math.log(propWidth / DEFAULT_TILE_SIZE) / Math.log(ZOOM_LEVEL_BASE));
            //the closest zoom level to the resolution, based on the formula width = zoom_base^zoom_level * tile_size -> zoom_level = log(width / tile_size)/log(zoom_base)
        }
                               
        try { //now take a zoom level that is available in the database
            zoomLevel = file.closestZoom(zoomLevel);
        } catch (SQLException e1) {
            throw new IOException(e1);
        }       
       
        long numberOfTiles = Math.round(Math.pow(ZOOM_LEVEL_BASE, zoomLevel)); //number of tile columns/rows for chosen zoom level
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.