Java 类com.google.android.gms.maps.model.TileProvider 实例源码

项目:saarang-iosched    文件:MapFragment.java   
void addTileProvider(int floor, File f) {
    if (!f.exists()) {
        return;
    }
    TileProvider provider;
    try {
        SVGTileProvider svgProvider = new SVGTileProvider(f, mDPI);
        if (mTileCache == null) {
            // Use the SVGTileProvider directly as the TileProvider without a cache
            provider = svgProvider;
        } else {
            // Wrap the SVGTileProvider ina a CachedTileProvider for caching on disk
            provider = new CachedTileProvider(Integer.toString(floor), svgProvider, mTileCache);
        }
    } catch (IOException e) {
        LogUtils.LOGD(TAG, "Could not create Tile Provider.");
        return;
    }

    TileOverlayOptions tileOverlay = new TileOverlayOptions()
            .tileProvider(provider).visible(false);

    mTileProviders.put(floor, provider);
    mTileOverlays.put(floor, mMap.addTileOverlay(tileOverlay));
}
项目:SISTEM-INFORMASI-GEOGRAFIS-LOKASI-RESTORAN-DI-KOTA-BANDUNG-SUB-MODUL-ANDROID-BASE-APPLICATION-    文件:TileOverlayDemoActivity.java   
@Override
public void onMapReady(GoogleMap map) {
    map.setMapType(GoogleMap.MAP_TYPE_NONE);

    TileProvider tileProvider = new UrlTileProvider(256, 256) {
        @Override
        public synchronized URL getTileUrl(int x, int y, int zoom) {
            // The moon tile coordinate system is reversed.  This is not normal.
            int reversedY = (1 << zoom) - y - 1;
            String s = String.format(Locale.US, MOON_MAP_URL_FORMAT, zoom, y, x);
            URL url = null;
            try {
                url = new URL(s);
            } catch (MalformedURLException e) {
                throw new AssertionError(e);
            }
            return url;
        }
    };

    mMoonTiles = map.addTileOverlay(new TileOverlayOptions().tileProvider(tileProvider));
    mTransparencyBar.setOnSeekBarChangeListener(this);
}
项目:mage-android    文件:MapFragment.java   
/**
 * Add XYZ Directory tile cache overlay
 * @param enabledCacheOverlays
 * @param xyzDirectoryCacheOverlay
 */
private void addXYZDirectoryCacheOverlay(Map<String, CacheOverlay> enabledCacheOverlays, XYZDirectoryCacheOverlay xyzDirectoryCacheOverlay){
    // Retrieve the cache overlay if it already exists (and remove from cache overlays)
    CacheOverlay cacheOverlay = cacheOverlays.remove(xyzDirectoryCacheOverlay.getCacheName());
    if(cacheOverlay == null){
        // Create a new tile provider and add to the map
        TileProvider tileProvider = new FileSystemTileProvider(256, 256, xyzDirectoryCacheOverlay.getDirectory().getAbsolutePath());
        TileOverlayOptions overlayOptions = createTileOverlayOptions(tileProvider);
        // Set the tile overlay in the cache overlay
        TileOverlay tileOverlay = map.addTileOverlay(overlayOptions);
        xyzDirectoryCacheOverlay.setTileOverlay(tileOverlay);
        cacheOverlay = xyzDirectoryCacheOverlay;
    }
    // Add the cache overlay to the enabled cache overlays
    enabledCacheOverlays.put(cacheOverlay.getCacheName(), cacheOverlay);
}
项目:AppDevFestSudeste2015    文件:MapFragment.java   
void addTileProvider(int floor, File f) {
    if (!f.exists()) {
        return;
    }
    TileProvider provider;
    try {
        SVGTileProvider svgProvider = new SVGTileProvider(f, mDPI);
        if (mTileCache == null) {
            // Use the SVGTileProvider directly as the TileProvider without a cache
            provider = svgProvider;
        } else {
            // Wrap the SVGTileProvider ina a CachedTileProvider for caching on disk
            provider = new CachedTileProvider(Integer.toString(floor), svgProvider, mTileCache);
        }
    } catch (IOException e) {
        LOGD(TAG, "Could not create Tile Provider.");
        return;
    }

    TileOverlayOptions tileOverlay = new TileOverlayOptions()
            .tileProvider(provider).visible(false);

    mTileProviders.put(floor, provider);
    mTileOverlays.put(floor, mMap.addTileOverlay(tileOverlay));
}
项目:devfestnorte-app    文件:MapFragment.java   
void addTileProvider(int floor, File f) {
    if (!f.exists()) {
        return;
    }
    TileProvider provider;
    try {
        SVGTileProvider svgProvider = new SVGTileProvider(f, mDPI);
        if (mTileCache == null) {
            // Use the SVGTileProvider directly as the TileProvider without a cache
            provider = svgProvider;
        } else {
            // Wrap the SVGTileProvider ina a CachedTileProvider for caching on disk
            provider = new CachedTileProvider(Integer.toString(floor), svgProvider, mTileCache);
        }
    } catch (IOException e) {
        LOGD(TAG, "Could not create Tile Provider.");
        return;
    }

    TileOverlayOptions tileOverlay = new TileOverlayOptions()
            .tileProvider(provider).visible(false);

    mTileProviders.put(floor, provider);
    mTileOverlays.put(floor, mMap.addTileOverlay(tileOverlay));
}
项目:XamarinAdmobTutorial    文件:TileOverlayDemoActivity.java   
private void setUpMap() {
    mMap.setMapType(GoogleMap.MAP_TYPE_NONE);

    TileProvider tileProvider = new UrlTileProvider(256, 256) {
        @Override
        public synchronized URL getTileUrl(int x, int y, int zoom) {
            // The moon tile coordinate system is reversed.  This is not normal.
            int reversedY = (1 << zoom) - y - 1;
            String s = String.format(Locale.US, MOON_MAP_URL_FORMAT, zoom, x, reversedY);
            URL url = null;
            try {
                url = new URL(s);
            } catch (MalformedURLException e) {
                throw new AssertionError(e);
            }
            return url;
        }
    };

    mMoonTiles = mMap.addTileOverlay(new TileOverlayOptions().tileProvider(tileProvider));
}
项目:andbtiles    文件:MBTilesProvider.java   
@Override
public Tile getTile(int x, int y, int z) {
    // query the provider for a tile specified by x, y and z coordinates
    String[] projection = new String[]{TilesContract.COLUMN_TILE_DATA};
    String selection = TilesContract.COLUMN_ZOOM_LEVEL + " = ? AND "
            + TilesContract.COLUMN_TILE_COLUMN + "= ? AND "
            + TilesContract.COLUMN_TILE_ROW + "= ?";
    String[] selectionArgs = new String[]{String.valueOf(z), String.valueOf(x), String.valueOf((int) (Math.pow(2, z) - y - 1))};
    // .mbtiles database use TSM coordinates
    // we need to switch to Google compatible coordinates
    // https://gist.github.com/tmcw/4954720
    Cursor cursor = mContext.getContentResolver().query(Uri.parse(mContentProviderPath), projection, selection, selectionArgs, null);
    Tile tile = TileProvider.NO_TILE;
    if (cursor.moveToFirst())
        tile = cursorToMapItem(cursor);
    // make sure to close the cursor
    cursor.close();
    return tile;
}
项目:saarang-iosched    文件:MapFragment.java   
void addTileProvider(int floor, File f) {
    if (!f.exists()) {
        return;
    }
    TileProvider provider;
    try {
        SVGTileProvider svgProvider = new SVGTileProvider(f, mDPI);
        if (mTileCache == null) {
            // Use the SVGTileProvider directly as the TileProvider without a cache
            provider = svgProvider;
        } else {
            // Wrap the SVGTileProvider ina a CachedTileProvider for caching on disk
            provider = new CachedTileProvider(Integer.toString(floor), svgProvider, mTileCache);
        }
    } catch (IOException e) {
        LogUtils.LOGD(TAG, "Could not create Tile Provider.");
        return;
    }

    TileOverlayOptions tileOverlay = new TileOverlayOptions()
            .tileProvider(provider).visible(false);

    mTileProviders.put(floor, provider);
    mTileOverlays.put(floor, mMap.addTileOverlay(tileOverlay));
}
项目:HereAStory-Android    文件:TileOverlayDemoActivity.java   
private void setUpMap() {
    mMap.setMapType(GoogleMap.MAP_TYPE_NONE);

    TileProvider tileProvider = new UrlTileProvider(256, 256) {
        @Override
        public synchronized URL getTileUrl(int x, int y, int zoom) {
            // The moon tile coordinate system is reversed.  This is not normal.
            int reversedY = (1 << zoom) - y - 1;
            String s = String.format(Locale.US, MOON_MAP_URL_FORMAT, zoom, x, reversedY);
            URL url = null;
            try {
                url = new URL(s);
            } catch (MalformedURLException e) {
                throw new AssertionError(e);
            }
            return url;
        }
    };

    mMoonTiles = mMap.addTileOverlay(new TileOverlayOptions().tileProvider(tileProvider));
}
项目:GoogleMapsV2Demo    文件:TileOverlayDemoActivity.java   
private void setUpMap() {
    mMap.setMapType(GoogleMap.MAP_TYPE_NONE);

    TileProvider tileProvider = new UrlTileProvider(256, 256) {
        @Override
        public synchronized URL getTileUrl(int x, int y, int zoom) {
            // The moon tile coordinate system is reversed.  This is not normal.
            int reversedY = (1 << zoom) - y - 1;
            String s = String.format(Locale.US, MOON_MAP_URL_FORMAT, zoom, x, reversedY);
            URL url = null;
            try {
                url = new URL(s);
            } catch (MalformedURLException e) {
                throw new AssertionError(e);
            }
            return url;
        }
    };

    mMap.addTileOverlay(new TileOverlayOptions().tileProvider(tileProvider));
}
项目:opentravelmate    文件:NativeMap.java   
/**
 * Add an overlay to the map.
 * 
 * @param id
    *     Map place holder ID.
 * @param jsonTileOverlay
 *     JSON serialized TileOverlay.
 */
@JavascriptInterface
public void addTileOverlay(final String id, final String jsonTileOverlay) {
    final GoogleMap map = getGoogleMapSync(id);

    UIThreadExecutor.execute(postponeWhenMapIsInvisible(id, new Runnable() {
        @Override public void run() {
            try {
                TileOverlay tileOverlay = TileOverlay.fromJsonTileOverlay(new JSONObject(jsonTileOverlay));

                TileProvider tileProvider = new UrlPatternTileProvider(tileOverlay.tileUrlPattern, tileOverlay.enableGrayscaleFilter);
                com.google.android.gms.maps.model.TileOverlay gTileOverlay = map.addTileOverlay(new TileOverlayOptions()
                    .tileProvider(tileProvider)
                    .zIndex(tileOverlay.zIndex));
                tileOverlayById.put(tileOverlay.id, gTileOverlay);
            } catch (JSONException e) {
                exceptionListener.onException(false, e);
            }
        }
    }));
}
项目:iosched2013    文件:MapFragment.java   
/**
 * Clears the map and initialises all map variables that hold markers and overlays.
 */
private void clearMap() {
    if (mMap != null) {
        mMap.clear();
    }

    // setup tile provider arrays
    mTileProviders = new TileProvider[NUM_FLOORS];
    mTileOverlays = new TileOverlay[NUM_FLOORS];

    mMarkers = new HashMap<String, MarkerModel>();
    mMarkersFloor = new ArrayList<ArrayList<Marker>>();

    // initialise floor marker lists
    for (int i = 0; i < NUM_FLOORS; i++) {
        mMarkersFloor.add(i, new ArrayList<Marker>());
    }
}
项目:iosched2013    文件:MapFragment.java   
void addTileProvider(int floor, File f) {
    if (!f.exists()) {
        return;
    }

    TileProvider provider;
    try {
        provider = new SVGTileProvider(f, mDPI);
    } catch (IOException e) {
        LOGD(TAG, "Could not create Tile Provider.");
        e.printStackTrace();
        return;
    }
    TileOverlayOptions tileOverlay = new TileOverlayOptions()
            .tileProvider(provider).visible(false);
    mTileProviders[floor] = provider;
    mTileOverlays[floor] = mMap.addTileOverlay(tileOverlay);
}
项目:Tower-develop    文件:OfflineTileProvider.java   
@Override
public Tile getTile(int x, int y, int zoom) {
    if (zoom > maxZoomLevel) {
        return TileProvider.NO_TILE;
    }

    final String tileUri = MapboxUtils.getMapTileURL(mapboxId, mapboxAccessToken, zoom, x, y);
    byte[] data = DatabaseState.getOfflineDatabaseHandlerForMapId(context, mapboxId).dataForURL(tileUri);
    if (data == null || data.length == 0)
        return TileProvider.NO_TILE;

    return new Tile(MapboxUtils.TILE_WIDTH, MapboxUtils.TILE_HEIGHT, data);
}
项目:mage-android    文件:MapFragment.java   
/**
 * Create Tile Overlay Options for the Tile Provider using the z index
 * @param tileProvider
 * @param zIndex
 * @return
 */
private TileOverlayOptions createTileOverlayOptions(TileProvider tileProvider, int zIndex){
    TileOverlayOptions overlayOptions = new TileOverlayOptions();
    overlayOptions.tileProvider(tileProvider);
    overlayOptions.zIndex(zIndex);
    return overlayOptions;
}
项目:android-wms    文件:MainActivity.java   
private void setUpMap() {
    TileProvider wmsTileProvider = TileProviderFactory.getOsgeoWmsTileProvider();
    mMap.addTileOverlay(new TileOverlayOptions().tileProvider(wmsTileProvider));

    // Because the demo WMS layer we are using is just a white background map, switch the base layer
    // to satellite so we can see the WMS overlay.
    mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
}
项目:referendum_1o_android    文件:TileOverlayOptions.java   
public TileProvider getTileProvider() {
    return real.getTileProvider();
}
项目:Tower-develop    文件:TileProviderManager.java   
protected TileProviderManager(TileProvider onlineTileProvider, TileProvider offlineTileProvider) {
    this.offlineTileProvider = offlineTileProvider;
    this.onlineTileProvider = onlineTileProvider;
}
项目:Tower-develop    文件:TileProviderManager.java   
public TileProvider getOfflineTileProvider() {
    return offlineTileProvider;
}
项目:Tower-develop    文件:TileProviderManager.java   
public TileProvider getOnlineTileProvider() {
    return onlineTileProvider;
}
项目:XamarinAdmobTutorial    文件:TileCoordinateDemoActivity.java   
private void setUpMap() {
     TileProvider coordTileProvider = new CoordTileProvider(this.getApplicationContext());
     mMap.addTileOverlay(new TileOverlayOptions().tileProvider(coordTileProvider));
}
项目:HereAStory-Android    文件:TileCoordinateDemoActivity.java   
private void setUpMap() {
     TileProvider coordTileProvider = new CoordTileProvider(this.getApplicationContext());
     mMap.addTileOverlay(new TileOverlayOptions().tileProvider(coordTileProvider));
}
项目:HereAStory-Android    文件:TileOverlayOptions.java   
public TileProvider getTileProvider() {
    return real.getTileProvider();
}
项目:mtransit-for-android    文件:TileOverlayOptions.java   
public TileProvider getTileProvider() {
    return real.getTileProvider();
}
项目:disconnected-content-explorer-android    文件:GeoPackageMapOverlays.java   
/**
 * Create Tile Overlay Options for the Tile Provider using the z index
 *
 * @param tileProvider
 * @param zIndex
 * @return
 */
private TileOverlayOptions createTileOverlayOptions(TileProvider tileProvider, int zIndex) {
    TileOverlayOptions overlayOptions = new TileOverlayOptions();
    overlayOptions.tileProvider(tileProvider);
    overlayOptions.zIndex(zIndex);
    return overlayOptions;
}
项目:iosched-reader    文件:CachedTileProvider.java   
/**
 * TileProvider that wraps another TileProvider and caches all Tiles in a DiskLruCache.
 *
 * <p>A {@link com.jakewharton.disklrucache.DiskLruCache} can be reused across multiple
 * instances.
 * The keyTag is used to annotate entries for this TileProvider, it is recommended to use a
 * unique
 * String for each instance to prevent collisions.
 *
 * <p>NOTE: The supplied {@link com.jakewharton.disklrucache.DiskLruCache} requires space for
 * 3 entries per cached object.
 *
 * @param keyTag       identifier used to identify tiles for this CachedTileProvider instance
 * @param tileProvider tiles from this TileProvider will be cached.
 * @param cache        the cache used to store tiles
 */
public CachedTileProvider(String keyTag, TileProvider tileProvider, DiskLruCache cache) {
    mKeyTag = keyTag;
    mTileProvider = tileProvider;
    mCache = cache;
}
项目:geopackage-android-map    文件:GeoPackageOverlayFactory.java   
/**
 * Get a Tile Provider for the Tile DAO
 *
 * @param tileDao
 * @return
 */
public static TileProvider getTileProvider(TileDao tileDao) {
    return getBoundedOverlay(tileDao);
}
项目:smconf-android    文件:CachedTileProvider.java   
/**
 * TileProvider that wraps another TileProvider and caches all Tiles in a DiskLruCache.
 *
 * <p>A {@link com.jakewharton.disklrucache.DiskLruCache} can be reused across multiple
 * instances.
 * The keyTag is used to annotate entries for this TileProvider, it is recommended to use a
 * unique
 * String for each instance to prevent collisions.
 *
 * <p>NOTE: The supplied {@link com.jakewharton.disklrucache.DiskLruCache} requires space for
 * 3 entries per cached object.
 *
 * @param keyTag       identifier used to identify tiles for this CachedTileProvider instance
 * @param tileProvider tiles from this TileProvider will be cached.
 * @param cache        the cache used to store tiles
 */
public CachedTileProvider(String keyTag, TileProvider tileProvider, DiskLruCache cache) {
    mKeyTag = keyTag;
    mTileProvider = tileProvider;
    mCache = cache;
}
项目:2015-Google-I-O-app    文件:CachedTileProvider.java   
/**
 * TileProvider that wraps another TileProvider and caches all Tiles in a DiskLruCache.
 *
 * <p>A {@link com.jakewharton.disklrucache.DiskLruCache} can be reused across multiple
 * instances.
 * The keyTag is used to annotate entries for this TileProvider, it is recommended to use a
 * unique
 * String for each instance to prevent collisions.
 *
 * <p>NOTE: The supplied {@link com.jakewharton.disklrucache.DiskLruCache} requires space for
 * 3 entries per cached object.
 *
 * @param keyTag       identifier used to identify tiles for this CachedTileProvider instance
 * @param tileProvider tiles from this TileProvider will be cached.
 * @param cache        the cache used to store tiles
 */
public CachedTileProvider(String keyTag, TileProvider tileProvider, DiskLruCache cache) {
    mKeyTag = keyTag;
    mTileProvider = tileProvider;
    mCache = cache;
}
项目:FMTech    文件:CachedTileProvider.java   
/**
 * TileProvider that wraps another TileProvider and caches all Tiles in a DiskLruCache.
 *
 * <p>A {@link com.jakewharton.disklrucache.DiskLruCache} can be reused across multiple
 * instances.
 * The keyTag is used to annotate entries for this TileProvider, it is recommended to use a
 * unique
 * String for each instance to prevent collisions.
 *
 * <p>NOTE: The supplied {@link com.jakewharton.disklrucache.DiskLruCache} requires space for
 * 3 entries per cached object.
 *
 * @param keyTag       identifier used to identify tiles for this CachedTileProvider instance
 * @param tileProvider tiles from this TileProvider will be cached.
 * @param cache        the cache used to store tiles
 */
public CachedTileProvider(String keyTag, TileProvider tileProvider, DiskLruCache cache) {
    mKeyTag = keyTag;
    mTileProvider = tileProvider;
    mCache = cache;
}
项目:mage-android    文件:MapFragment.java   
/**
 * Create Feature Tile Overlay Options with the default z index for tile layers drawn from features
 * @param tileProvider
 * @return
 */
private TileOverlayOptions createFeatureTileOverlayOptions(TileProvider tileProvider){
    return createTileOverlayOptions(tileProvider, -1);
}
项目:mage-android    文件:MapFragment.java   
/**
 * Create Tile Overlay Options with the default z index for tile layers
 * @param tileProvider
 * @return
 */
private TileOverlayOptions createTileOverlayOptions(TileProvider tileProvider){
    return createTileOverlayOptions(tileProvider, -2);
}
项目:saarang-iosched    文件:CachedTileProvider.java   
/**
 * TileProvider that wraps another TileProvider and caches all Tiles in a DiskLruCache.
 *
 * <p>A {@link com.jakewharton.disklrucache.DiskLruCache} can be reused across multiple instances.
 * The keyTag is used to annotate entries for this TileProvider, it is recommended to use a unique
 * String for each instance to prevent collisions.
 *
 * <p>NOTE: The supplied {@link com.jakewharton.disklrucache.DiskLruCache} requires space for
 * 3 entries per cached object.
 *
 * @param keyTag identifier used to identify tiles for this CachedTileProvider instance
 * @param tileProvider tiles from this TileProvider will be cached.
 * @param cache the cache used to store tiles
 */
public CachedTileProvider(String keyTag, TileProvider tileProvider, DiskLruCache cache) {
    mKeyTag = keyTag;
    mTileProvider = tileProvider;
    mCache = cache;
}
项目:AppDevFestSudeste2015    文件:CachedTileProvider.java   
/**
 * TileProvider that wraps another TileProvider and caches all Tiles in a DiskLruCache.
 *
 * <p>A {@link com.jakewharton.disklrucache.DiskLruCache} can be reused across multiple instances.
 * The keyTag is used to annotate entries for this TileProvider, it is recommended to use a unique
 * String for each instance to prevent collisions.
 *
 * <p>NOTE: The supplied {@link com.jakewharton.disklrucache.DiskLruCache} requires space for
 * 3 entries per cached object.
 *
 * @param keyTag identifier used to identify tiles for this CachedTileProvider instance
 * @param tileProvider tiles from this TileProvider will be cached.
 * @param cache the cache used to store tiles
 */
public CachedTileProvider(String keyTag, TileProvider tileProvider, DiskLruCache cache) {
    mKeyTag = keyTag;
    mTileProvider = tileProvider;
    mCache = cache;
}
项目:devnexus-android    文件:CachedTileProvider.java   
/**
 * TileProvider that wraps another TileProvider and caches all Tiles in a DiskLruCache.
 *
 * <p>A {@link com.jakewharton.disklrucache.DiskLruCache} can be reused across multiple
 * instances.
 * The keyTag is used to annotate entries for this TileProvider, it is recommended to use a
 * unique
 * String for each instance to prevent collisions.
 *
 * <p>NOTE: The supplied {@link com.jakewharton.disklrucache.DiskLruCache} requires space for
 * 3 entries per cached object.
 *
 * @param keyTag       identifier used to identify tiles for this CachedTileProvider instance
 * @param tileProvider tiles from this TileProvider will be cached.
 * @param cache        the cache used to store tiles
 */
public CachedTileProvider(String keyTag, TileProvider tileProvider, DiskLruCache cache) {
    mKeyTag = keyTag;
    mTileProvider = tileProvider;
    mCache = cache;
}
项目:iosched    文件:CachedTileProvider.java   
/**
 * TileProvider that wraps another TileProvider and caches all Tiles in a DiskLruCache.
 *
 * <p>A {@link com.jakewharton.disklrucache.DiskLruCache} can be reused across multiple
 * instances.
 * The keyTag is used to annotate entries for this TileProvider, it is recommended to use a
 * unique
 * String for each instance to prevent collisions.
 *
 * <p>NOTE: The supplied {@link com.jakewharton.disklrucache.DiskLruCache} requires space for
 * 3 entries per cached object.
 *
 * @param keyTag       identifier used to identify tiles for this CachedTileProvider instance
 * @param tileProvider tiles from this TileProvider will be cached.
 * @param cache        the cache used to store tiles
 */
public CachedTileProvider(String keyTag, TileProvider tileProvider, DiskLruCache cache) {
    mKeyTag = keyTag;
    mTileProvider = tileProvider;
    mCache = cache;
}
项目:devfestnorte-app    文件:CachedTileProvider.java   
/**
 * TileProvider that wraps another TileProvider and caches all Tiles in a DiskLruCache.
 *
 * <p>A {@link com.jakewharton.disklrucache.DiskLruCache} can be reused across multiple instances.
 * The keyTag is used to annotate entries for this TileProvider, it is recommended to use a unique
 * String for each instance to prevent collisions.
 *
 * <p>NOTE: The supplied {@link com.jakewharton.disklrucache.DiskLruCache} requires space for
 * 3 entries per cached object.
 *
 * @param keyTag identifier used to identify tiles for this CachedTileProvider instance
 * @param tileProvider tiles from this TileProvider will be cached.
 * @param cache the cache used to store tiles
 */
public CachedTileProvider(String keyTag, TileProvider tileProvider, DiskLruCache cache) {
    mKeyTag = keyTag;
    mTileProvider = tileProvider;
    mCache = cache;
}
项目:saarang-iosched    文件:CachedTileProvider.java   
/**
 * TileProvider that wraps another TileProvider and caches all Tiles in a DiskLruCache.
 *
 * <p>A {@link com.jakewharton.disklrucache.DiskLruCache} can be reused across multiple instances.
 * The keyTag is used to annotate entries for this TileProvider, it is recommended to use a unique
 * String for each instance to prevent collisions.
 *
 * <p>NOTE: The supplied {@link com.jakewharton.disklrucache.DiskLruCache} requires space for
 * 3 entries per cached object.
 *
 * @param keyTag identifier used to identify tiles for this CachedTileProvider instance
 * @param tileProvider tiles from this TileProvider will be cached.
 * @param cache the cache used to store tiles
 */
public CachedTileProvider(String keyTag, TileProvider tileProvider, DiskLruCache cache) {
    mKeyTag = keyTag;
    mTileProvider = tileProvider;
    mCache = cache;
}
项目:devnexus-android    文件:CachedTileProvider.java   
/**
 * TileProvider that wraps another TileProvider and caches all Tiles in a DiskLruCache.
 *
 * <p>A {@link com.jakewharton.disklrucache.DiskLruCache} can be reused across multiple
 * instances.
 * The keyTag is used to annotate entries for this TileProvider, it is recommended to use a
 * unique
 * String for each instance to prevent collisions.
 *
 * <p>NOTE: The supplied {@link com.jakewharton.disklrucache.DiskLruCache} requires space for
 * 3 entries per cached object.
 *
 * @param keyTag       identifier used to identify tiles for this CachedTileProvider instance
 * @param tileProvider tiles from this TileProvider will be cached.
 * @param cache        the cache used to store tiles
 */
public CachedTileProvider(String keyTag, TileProvider tileProvider, DiskLruCache cache) {
    mKeyTag = keyTag;
    mTileProvider = tileProvider;
    mCache = cache;
}