use of org.osmdroid.tileprovider.MapTileProviderBasic in project android-sdk-examples by IndoorAtlas.
the class OpenStreetMapOverlay method onResume.
@Override
protected void onResume() {
super.onResume();
if (mOsmv == null) {
mOsmv = new MapView(this);
mOsmv.setTilesScaledToDpi(true);
mOsmv.setBuiltInZoomControls(true);
mOsmv.getController().setZoom(18);
mProvider = new MapTileProviderBasic(getApplicationContext());
mProvider.setTileSource(TileSourceFactory.DEFAULT_TILE_SOURCE);
mTilesOverlay = new TilesOverlay(mProvider, getBaseContext());
mOsmv.getOverlays().add(mTilesOverlay);
mLayout = new RelativeLayout(this);
mLayout.addView(mOsmv, new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
setContentView(mLayout);
}
// start receiving location updates & monitor region changes
mIALocationManager.requestLocationUpdates(IALocationRequest.create(), mListener);
mIALocationManager.registerRegionListener(mRegionListener);
}
Aggregations