diff --git a/OsmAnd/src/net/osmand/plus/views/MapTileLayer.java b/OsmAnd/src/net/osmand/plus/views/MapTileLayer.java index 23ab270a24..22d4e40848 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapTileLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapTileLayer.java @@ -6,8 +6,10 @@ import net.osmand.data.RotatedTileBox; import net.osmand.map.ITileSource; import net.osmand.map.TileSourceManager; import net.osmand.map.TileSourceManager.TileSourceTemplate; +import net.osmand.plus.OsmandPlugin; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; +import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin; import net.osmand.plus.resources.ResourceManager; import net.osmand.util.MapUtils; import android.graphics.Bitmap; @@ -146,8 +148,8 @@ public class MapTileLayer extends BaseMapLayer { int width = (int) Math.ceil(tilesRect.right - left); int height = (int) Math.ceil(tilesRect.bottom + ellipticTileCorrection - top); - boolean useInternet = settings.USE_INTERNET_TO_DOWNLOAD_TILES.get() - && settings.isInternetConnectionAvailable() && map.couldBeDownloadedFromInternet(); + boolean useInternet = OsmandPlugin.getEnabledPlugin(OsmandRasterMapsPlugin.class) != null && + settings.USE_INTERNET_TO_DOWNLOAD_TILES.get() && settings.isInternetConnectionAvailable() && map.couldBeDownloadedFromInternet(); int maxLevel = Math.min(view.getSettings().MAX_LEVEL_TO_DOWNLOAD_TILE.get(), map.getMaximumZoomSupported()); int tileSize = map.getTileSize(); boolean oneTileShown = false;