vtm-android: dont force MapView to use MapActivity context

This commit is contained in:
Hannes Janetzek
2014-01-19 22:39:25 +01:00
parent 35d7d2c0b5
commit 350f6394fd
7 changed files with 12 additions and 49 deletions

View File

@@ -28,7 +28,7 @@ import android.view.Menu;
public class BaseMapActivity extends MapActivity {
private final static boolean USE_CACHE = false;
private final static boolean USE_CACHE = true;
MapView mMapView;
VectorTileLayer mBaseLayer;
@@ -42,6 +42,7 @@ public class BaseMapActivity extends MapActivity {
setContentView(R.layout.activity_map);
mMapView = (MapView) findViewById(R.id.mapView);
registerMapView(mMapView);
mTileSource = new OSciMap4TileSource();
mTileSource.setOption("url", "http://opensciencemap.org/tiles/vtm");

View File

@@ -43,6 +43,7 @@ public class MarkerOverlayActivity extends MapActivity implements OnItemGestureL
setContentView(R.layout.activity_map);
mMapView = (MapView) findViewById(R.id.mapView);
registerMapView(mMapView);
MarkerSymbol symbol = AndroidGraphics.makeMarker(getResources(),
R.drawable.marker_poi,

View File

@@ -37,6 +37,7 @@ public class PathOverlayActivity extends MapActivity {
setContentView(R.layout.activity_map);
mMapView = (MapView) findViewById(R.id.mapView);
registerMapView(mMapView);
for (double lon = -180; lon < 180; lon += 5) {
List<GeoPoint> pts = new ArrayList<GeoPoint>();