<NME> RendererLayer.java
<BEF> package cgeo.geocaching.maps.mapsforge.v6.layers;

import org.mapsforge.core.graphics.GraphicFactory;
import org.mapsforge.map.datastore.MapDataStore;
import org.mapsforge.map.layer.Layer;
import org.mapsforge.map.layer.cache.TileCache;
import org.mapsforge.map.layer.renderer.TileRendererLayer;
import org.mapsforge.map.model.MapViewPosition;

public class RendererLayer implements ITileLayer {

    private final TileRendererLayer tileLayer;

    public RendererLayer(final TileCache tileCache, final MapDataStore mapDataStore, final MapViewPosition mapViewPosition, final boolean isTransparent, final boolean renderLabels, final boolean cacheLabels, final GraphicFactory graphicFactory) {
        tileLayer = new TileRendererLayer(tileCache, mapDataStore, mapViewPosition, isTransparent, renderLabels, cacheLabels, graphicFactory);
    }

    @Override
    public Layer getTileLayer() {
        return tileLayer;
    }

    @Override
    public boolean hasThemes() {
        return true;
    }

    @Override
    public void onResume() {
        // Nothing to do
    }

    @Override
    public void onPause() {
        // Nothing to do
    }

}

<MSG> Refactors MapforgeMapSource and TileLayer

To address comment https://github.com/cgeo/cgeo/pull/6948#discussion_r172409286

<DFF> @@ -1,17 +1,20 @@
 package cgeo.geocaching.maps.mapsforge.v6.layers;
 
 import org.mapsforge.core.graphics.GraphicFactory;
-import org.mapsforge.map.datastore.MapDataStore;
 import org.mapsforge.map.layer.Layer;
 import org.mapsforge.map.layer.cache.TileCache;
 import org.mapsforge.map.layer.renderer.TileRendererLayer;
 import org.mapsforge.map.model.MapViewPosition;
+import org.mapsforge.map.reader.MapFile;
 
 public class RendererLayer implements ITileLayer {
 
     private final TileRendererLayer tileLayer;
 
-    public RendererLayer(final TileCache tileCache, final MapDataStore mapDataStore, final MapViewPosition mapViewPosition, final boolean isTransparent, final boolean renderLabels, final boolean cacheLabels, final GraphicFactory graphicFactory) {
+    private final MapFile mapDataStore;
+
+    public RendererLayer(final TileCache tileCache, final MapFile mapDataStore, final MapViewPosition mapViewPosition, final boolean isTransparent, final boolean renderLabels, final boolean cacheLabels, final GraphicFactory graphicFactory) {
+        this.mapDataStore = mapDataStore;
         tileLayer = new TileRendererLayer(tileCache, mapDataStore, mapViewPosition, isTransparent, renderLabels, cacheLabels, graphicFactory);
     }
 
@@ -35,4 +38,19 @@ public class RendererLayer implements ITileLayer {
         // Nothing to do
     }
 
+    @Override
+    public int getFixedTileSize() {
+        return 0;
+    }
+
+    @Override
+    public byte getZoomLevelMin() {
+        return mapDataStore.getMapFileHeader().getMapFileInfo().zoomLevelMin;
+    }
+
+    @Override
+    public byte getZoomLevelMax() {
+        return mapDataStore.getMapFileHeader().getMapFileInfo().zoomLevelMax;
+    }
+
 }

Refactors MapforgeMapSource and TileLayer