TileGridLayer

This commit is contained in:
Hannes Janetzek
2014-01-31 01:45:46 +01:00
parent a828007c89
commit f6f64deffb
2 changed files with 16 additions and 0 deletions

View File

@@ -17,7 +17,10 @@ package org.oscim.android.test;
import org.oscim.android.MapActivity;
import org.oscim.android.MapView;
import org.oscim.android.cache.TileCache;
import org.oscim.backend.canvas.Color;
import org.oscim.layers.TileGridLayer;
import org.oscim.layers.tile.BitmapTileLayer;
import org.oscim.renderer.MapRenderer;
import org.oscim.tiling.source.TileSource;
import org.oscim.tiling.source.bitmap.DefaultSources;
@@ -48,6 +51,9 @@ public class BitmapTileMapActivity extends MapActivity {
mMapView = (MapView) findViewById(R.id.mapView);
registerMapView(mMapView);
MapRenderer.setBackgroundColor(0xff777777);
mMap.getLayers().add(new TileGridLayer(mMap, Color.GRAY, 1.8f, 8));
if (USE_CACHE) {
mCache = new TileCache(this, null, mTileSource.getClass().getSimpleName());
mCache.setCacheSize(512 * (1 << 10));