rename getViewport/Animator/Layer() to viewport/animator/layers()
- these are composite parts of Map
This commit is contained in:
@@ -52,14 +52,14 @@ public class BitmapTileMapActivity extends MapActivity {
|
||||
registerMapView(mMapView);
|
||||
|
||||
MapRenderer.setBackgroundColor(0xff777777);
|
||||
mMap.getLayers().add(new TileGridLayer(mMap, Color.GRAY, 1.8f, 8));
|
||||
mMap.layers().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));
|
||||
mTileSource.setCache(mCache);
|
||||
}
|
||||
mMap.getLayers().add(new BitmapTileLayer(mMap, mTileSource));
|
||||
mMap.layers().add(new BitmapTileLayer(mMap, mTileSource));
|
||||
|
||||
mMap.setMapPosition(0, 0, 1 << 2);
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ public class MapsforgeMapActivity extends MapActivity {
|
||||
|
||||
VectorTileLayer l = mMap.setBaseMap(mTileSource);
|
||||
mMap.setTheme(InternalRenderTheme.DEFAULT);
|
||||
mMap.getLayers().add(new LabelLayer(mMap, l));
|
||||
mMap.layers().add(new LabelLayer(mMap, l));
|
||||
|
||||
MapInfo info = mTileSource.getMapInfo();
|
||||
if (info.boundingBox != null) {
|
||||
|
||||
@@ -51,7 +51,7 @@ implements OnItemGestureListener<MarkerItem> {
|
||||
new ItemizedLayer<MarkerItem>(mMap, new ArrayList<MarkerItem>(),
|
||||
symbol, this);
|
||||
|
||||
mMap.getLayers().add(markerLayer);
|
||||
mMap.layers().add(markerLayer);
|
||||
|
||||
List<MarkerItem> pts = new ArrayList<MarkerItem>();
|
||||
|
||||
@@ -63,7 +63,7 @@ implements OnItemGestureListener<MarkerItem> {
|
||||
|
||||
markerLayer.addItems(pts);
|
||||
|
||||
mMap.getLayers().add(new TileGridLayer(mMap));
|
||||
mMap.layers().add(new TileGridLayer(mMap));
|
||||
mMap.setMapPosition(0, 0, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ public class PathOverlayActivity extends BitmapTileMapActivity {
|
||||
PathLayer pathLayer = new PathLayer(mMap, c, 3);
|
||||
pathLayer.setPoints(pts);
|
||||
|
||||
mMap.getLayers().add(pathLayer);
|
||||
mMap.layers().add(pathLayer);
|
||||
}
|
||||
|
||||
for (double lat = -90; lat <= 90; lat += 5) {
|
||||
@@ -61,7 +61,7 @@ public class PathOverlayActivity extends BitmapTileMapActivity {
|
||||
PathLayer pathLayer = new PathLayer(mMap, c, 3);
|
||||
pathLayer.setPoints(pts);
|
||||
|
||||
mMap.getLayers().add(pathLayer);
|
||||
mMap.layers().add(pathLayer);
|
||||
}
|
||||
|
||||
mMap.setMapPosition(0, 0, 1);
|
||||
|
||||
@@ -30,7 +30,7 @@ public class SimpleMapActivity extends BaseMapActivity {
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
Layers layers = mMap.getLayers();
|
||||
Layers layers = mMap.layers();
|
||||
layers.add(new BuildingLayer(mMap, mBaseLayer));
|
||||
layers.add(new LabelLayer(mMap, mBaseLayer));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user