[android] insert layer above
This commit is contained in:
committed by
Ivo van Dongen
parent
3040d40772
commit
dc21396d71
@@ -70,7 +70,7 @@ public class CustomLayerActivity extends AppCompatActivity {
|
||||
ExampleCustomLayer.InitializeFunction,
|
||||
ExampleCustomLayer.RenderFunction,
|
||||
ExampleCustomLayer.DeinitializeFunction);
|
||||
mapboxMap.addLayer(customLayer, "building");
|
||||
mapboxMap.addLayerBelow(customLayer, "building");
|
||||
fab.setImageResource(R.drawable.ic_layers_clear);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public class CircleLayerActivity extends AppCompatActivity {
|
||||
Timber.e("That's not an url... ", malformedUrlException);
|
||||
}
|
||||
LineLayer lineLayer = new LineLayer("route_layer", "bus_route");
|
||||
mapboxMap.addLayer(lineLayer, "stops_layer");
|
||||
mapboxMap.addLayerBelow(lineLayer, "stops_layer");
|
||||
|
||||
// move camera to start route
|
||||
mapboxMap.animateCamera(CameraUpdateFactory.newCameraPosition(
|
||||
|
||||
@@ -77,7 +77,7 @@ public class CustomSpriteActivity extends AppCompatActivity {
|
||||
);
|
||||
|
||||
// lets add a circle below labels!
|
||||
mapboxMap.addLayer(layer, "waterway-label");
|
||||
mapboxMap.addLayerBelow(layer, "waterway-label");
|
||||
|
||||
fab.setImageResource(R.drawable.ic_directions_car_black);
|
||||
} else {
|
||||
|
||||
@@ -40,7 +40,6 @@ import java.io.Reader;
|
||||
import java.io.StringWriter;
|
||||
import java.io.Writer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import timber.log.Timber;
|
||||
@@ -302,7 +301,7 @@ public class RuntimeStyleActivity extends AppCompatActivity {
|
||||
// Only show me parks (except westerpark with stroke-width == 3)
|
||||
layer.setFilter(all(eq("type", "park"), eq("stroke-width", 2)));
|
||||
|
||||
mapboxMap.addLayer(layer, "building");
|
||||
mapboxMap.addLayerBelow(layer, "building");
|
||||
// layer.setPaintProperty(fillColor(Color.RED)); // XXX But not after the object is attached
|
||||
|
||||
// Or get the object later and set it. It's all good.
|
||||
|
||||
Reference in New Issue
Block a user