Java Code Examples for org.osmdroid.tileprovider.constants.OpenStreetMapTileProviderConstants#MINIMUM_ZOOMLEVEL

The following examples show how to use org.osmdroid.tileprovider.constants.OpenStreetMapTileProviderConstants#MINIMUM_ZOOMLEVEL . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MapTileProviderArray.java    From osmdroid with Apache License 2.0 5 votes vote down vote up
@Override
public int getMaximumZoomLevel() {
	int result = OpenStreetMapTileProviderConstants.MINIMUM_ZOOMLEVEL;
	synchronized (mTileProviderList) {
		for (final MapTileModuleProviderBase tileProvider : mTileProviderList) {
			if (tileProvider.getMaximumZoomLevel() > result) {
				result = tileProvider.getMaximumZoomLevel();
			}
		}
	}
	return result;
}
 
Example 2
Source File: MapTileApproximater.java    From osmdroid with Apache License 2.0 5 votes vote down vote up
private void computeZoomLevels() {
    boolean first = true;
    minZoomLevel = OpenStreetMapTileProviderConstants.MINIMUM_ZOOMLEVEL;
    for (final MapTileModuleProviderBase provider : mProviders) {
        final int otherMin = provider.getMinimumZoomLevel();;
        if (first) {
            first = false;
            minZoomLevel = otherMin;
        } else {
            minZoomLevel = Math.min(minZoomLevel, otherMin);
        }
    }
}
 
Example 3
Source File: MapTileApproximater.java    From osmdroid with Apache License 2.0 5 votes vote down vote up
/**
 * Approximate a tile from a lower zoom level
 *
 * @since 6.0.0
 * @param pMapTileIndex Destination tile, for the same place on the planet as the source, but on a higher zoom
 * @return
 */
public Bitmap approximateTileFromLowerZoom(final long pMapTileIndex) {
    for (int zoomDiff = 1; MapTileIndex.getZoom(pMapTileIndex) - zoomDiff >= OpenStreetMapTileProviderConstants.MINIMUM_ZOOMLEVEL ; zoomDiff ++) {
        final Bitmap bitmap = approximateTileFromLowerZoom(pMapTileIndex, zoomDiff);
        if (bitmap != null) {
            return bitmap;
        }
    }
    return null;
}
 
Example 4
Source File: SafeMapTileFilesystemProvider.java    From android_frameworks_mapsv1 with Apache License 2.0 4 votes vote down vote up
@Override
public int getMinimumZoomLevel() {
	ITileSource tileSource = mTileSource.get();
	return tileSource != null ? tileSource.getMinimumZoomLevel() : OpenStreetMapTileProviderConstants.MINIMUM_ZOOMLEVEL;
}
 
Example 5
Source File: MapTileAssetsProvider.java    From osmdroid with Apache License 2.0 4 votes vote down vote up
@Override
public int getMinimumZoomLevel() {
	ITileSource tileSource = mTileSource.get();
	return tileSource != null ? tileSource.getMinimumZoomLevel() : OpenStreetMapTileProviderConstants.MINIMUM_ZOOMLEVEL;
}
 
Example 6
Source File: MapTileFilesystemProvider.java    From osmdroid with Apache License 2.0 4 votes vote down vote up
@Override
public int getMinimumZoomLevel() {
	ITileSource tileSource = mTileSource.get();
	return tileSource != null ? tileSource.getMinimumZoomLevel() : OpenStreetMapTileProviderConstants.MINIMUM_ZOOMLEVEL;
}
 
Example 7
Source File: MapTileDownloader.java    From osmdroid with Apache License 2.0 4 votes vote down vote up
@Override
public int getMinimumZoomLevel() {
	OnlineTileSourceBase tileSource = mTileSource.get();
	return (tileSource != null ? tileSource.getMinimumZoomLevel() : OpenStreetMapTileProviderConstants.MINIMUM_ZOOMLEVEL);
}
 
Example 8
Source File: MapTileSqlCacheProvider.java    From osmdroid with Apache License 2.0 4 votes vote down vote up
@Override
public int getMinimumZoomLevel() {
    ITileSource tileSource = mTileSource.get();
    return tileSource != null ? tileSource.getMinimumZoomLevel() : OpenStreetMapTileProviderConstants.MINIMUM_ZOOMLEVEL;
}
 
Example 9
Source File: MapTileFileArchiveProvider.java    From osmdroid with Apache License 2.0 4 votes vote down vote up
@Override
public int getMinimumZoomLevel() {
	ITileSource tileSource = mTileSource.get();
	return tileSource != null ? tileSource.getMinimumZoomLevel() : OpenStreetMapTileProviderConstants.MINIMUM_ZOOMLEVEL;
}