Search in sources :

Example 1 with BaseMapLayer

use of net.osmand.plus.views.layers.base.BaseMapLayer in project Osmand by osmandapp.

the class DownloadTilesFragment method shouldShowDialog.

public static boolean shouldShowDialog(@NonNull OsmandApplication app) {
    BaseMapLayer mainLayer = app.getOsmandMap().getMapView().getMainLayer();
    MapTileLayer mapTileLayer = mainLayer instanceof MapTileLayer ? ((MapTileLayer) mainLayer) : null;
    ITileSource tileSource = app.getSettings().getMapTileSource(false);
    return mapTileLayer != null && mapTileLayer.isVisible() && tileSource.couldBeDownloadedFromInternet();
}
Also used : BaseMapLayer(net.osmand.plus.views.layers.base.BaseMapLayer) MapTileLayer(net.osmand.plus.views.layers.MapTileLayer) ITileSource(net.osmand.map.ITileSource)

Aggregations

ITileSource (net.osmand.map.ITileSource)1 MapTileLayer (net.osmand.plus.views.layers.MapTileLayer)1 BaseMapLayer (net.osmand.plus.views.layers.base.BaseMapLayer)1