vtm-android: dont force MapView to use MapActivity context
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user