/** * Initialize a new tile layer, represented by a MBTiles file. * * @param file a MBTiles file */ public MBTilesLayer(final File file) { super(file.getName(), file.getAbsolutePath()); initialize(file); }
/** * Initialize a new tile layer, represented by a MBTiles file. * * @param url path to a MBTiles file * @param context the graphics drawing context */ public MBTilesLayer(final Context context, final String url) { super(url.substring(url.lastIndexOf('/') + 1, url.lastIndexOf('.')), url); initialize(url, context); }
/** * Reads and opens a MBTiles file given by url and loads its tiles into this layer. */ private void initialize(String url, final Context context) { initialize(getFile(url, context)); }
/** * Initialize a new tile layer, represented by a Database file. * * @param db a database used as the MBTiles source */ public MBTilesLayer(final SQLiteDatabase db) { super(getFileName(db.getPath()), db.getPath()); initialize(db); }