Improve code / xml formatting, closes #54
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package org.oscim.android.start;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
|
||||
import org.oscim.android.MapPreferences;
|
||||
import org.oscim.android.MapView;
|
||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||
@@ -11,42 +14,39 @@ import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
|
||||
public class TestActivity extends ActionBarActivity {
|
||||
public static final Logger log = LoggerFactory.getLogger(TestActivity.class);
|
||||
MapView mMapView;
|
||||
MapPreferences mPrefs;
|
||||
public static final Logger log = LoggerFactory.getLogger(TestActivity.class);
|
||||
MapView mMapView;
|
||||
MapPreferences mPrefs;
|
||||
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_map);
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_map);
|
||||
|
||||
mMapView = (MapView) findViewById(R.id.mapView);
|
||||
Map map = mMapView.map();
|
||||
mPrefs = new MapPreferences(TestActivity.class.getName(), this);
|
||||
mMapView = (MapView) findViewById(R.id.mapView);
|
||||
Map map = mMapView.map();
|
||||
mPrefs = new MapPreferences(TestActivity.class.getName(), this);
|
||||
|
||||
VectorTileLayer baseLayer = map.setBaseMap(new OSciMap4TileSource());
|
||||
map.layers().add(new BuildingLayer(map, baseLayer));
|
||||
map.layers().add(new LabelLayer(map, baseLayer));
|
||||
map.setTheme(VtmThemes.DEFAULT);
|
||||
}
|
||||
VectorTileLayer baseLayer = map.setBaseMap(new OSciMap4TileSource());
|
||||
map.layers().add(new BuildingLayer(map, baseLayer));
|
||||
map.layers().add(new LabelLayer(map, baseLayer));
|
||||
map.setTheme(VtmThemes.DEFAULT);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
mPrefs.load(mMapView.map());
|
||||
mMapView.onResume();
|
||||
}
|
||||
mPrefs.load(mMapView.map());
|
||||
mMapView.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
|
||||
mMapView.onPause();
|
||||
mPrefs.save(mMapView.map());
|
||||
}
|
||||
mMapView.onPause();
|
||||
mPrefs.save(mMapView.map());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user