@Test public void testInitializeMbTilesLayersWithRasterTiles() { List<File> offlineFiles = Collections.singletonList(new File("src/test/resources/raster.mbtiles")); mbTilesHelper.initializeMbTileslayers(style, offlineFiles); assertNotNull(mbTilesHelper.tileServer); verify(style).addLayer(any(RasterLayer.class)); verify(style).addSource(any(Source.class)); }
public void initializeMbTileslayers(@NonNull Style style, List<File> offlineFiles) { init(offlineFiles); for (File file : offlineFiles) { String name = file.getName(); if (name.endsWith(MB_TILES_EXTENSION)) { String id = name.substring(0, name.length() - MB_TILES_EXTENSION.length()); addMbtiles(style, id, file); } } }
MBTilesHelper { public void initializeMbTileslayers(@NonNull Style style, List<File> offlineFiles) { init(offlineFiles); for (File file : offlineFiles) { String name = file.getName(); if (name.endsWith(MB_TILES_EXTENSION)) { String id = name.substring(0, name.length() - MB_TILES_EXTENSION.length()); addMbtiles(style, id, file); } } } }
MBTilesHelper { public void initializeMbTileslayers(@NonNull Style style, List<File> offlineFiles) { init(offlineFiles); for (File file : offlineFiles) { String name = file.getName(); if (name.endsWith(MB_TILES_EXTENSION)) { String id = name.substring(0, name.length() - MB_TILES_EXTENSION.length()); addMbtiles(style, id, file); } } }  }
MBTilesHelper { public void initializeMbTileslayers(@NonNull Style style, List<File> offlineFiles) { init(offlineFiles); for (File file : offlineFiles) { String name = file.getName(); if (name.endsWith(MB_TILES_EXTENSION)) { String id = name.substring(0, name.length() - MB_TILES_EXTENSION.length()); addMbtiles(style, id, file); } } }  void initializeMbTileslayers(@NonNull Style style, List<File> offlineFiles); Pair<Set<Source>, Set<Layer>> initializeMbTileslayers(File offlineFile); void setMBTileLayers(Context context, BaseLayerSwitcherPlugin baseLayerSwitcherPlugin); void onDestroy(); }
MBTilesHelper { public void initializeMbTileslayers(@NonNull Style style, List<File> offlineFiles) { init(offlineFiles); for (File file : offlineFiles) { String name = file.getName(); if (name.endsWith(MB_TILES_EXTENSION)) { String id = name.substring(0, name.length() - MB_TILES_EXTENSION.length()); addMbtiles(style, id, file); } } }  void initializeMbTileslayers(@NonNull Style style, List<File> offlineFiles); Pair<Set<Source>, Set<Layer>> initializeMbTileslayers(File offlineFile); void setMBTileLayers(Context context, BaseLayerSwitcherPlugin baseLayerSwitcherPlugin); void onDestroy(); static final String MB_TILES_EXTENSION; static final String MB_TILES_DIRECTORY; }