[android] - ignore location component unit test, update light test, update activity integration
This commit is contained in:
@@ -149,7 +149,7 @@ public class LightTest extends BaseActivityTest {
|
||||
|
||||
@Override
|
||||
public void perform(UiController uiController, View view) {
|
||||
light = mapboxMap.getLight();
|
||||
light = mapboxMap.getStyle().getLight();
|
||||
FillExtrusionLayer fillExtrusionLayer = new FillExtrusionLayer("3d-buildings", "composite");
|
||||
fillExtrusionLayer.setSourceLayer("building");
|
||||
fillExtrusionLayer.setFilter(eq(Expression.get("extrude"), "true"));
|
||||
|
||||
@@ -109,7 +109,7 @@ public class LightTest extends BaseActivityTest {
|
||||
|
||||
@Override
|
||||
public void perform(UiController uiController, View view) {
|
||||
light = mapboxMap.getLight();
|
||||
light = mapboxMap.getStyle().getLight();
|
||||
FillExtrusionLayer fillExtrusionLayer = new FillExtrusionLayer("3d-buildings", "composite");
|
||||
fillExtrusionLayer.setSourceLayer("building");
|
||||
fillExtrusionLayer.setFilter(eq(Expression.get("extrude"), "true"));
|
||||
|
||||
@@ -25,7 +25,7 @@ import com.mapbox.mapboxsdk.testapp.R;
|
||||
* Test activity showing how to use a series of images to create an animation
|
||||
* with an ImageSource
|
||||
* <p>
|
||||
* GL-native equivalent of https://www.mapbox.com/mapbox-gl-js/example/animate-images/
|
||||
* GL-native equivalent of https://www.mapbox.com/mapbox-gl-js/example/animate-images/
|
||||
* </p>
|
||||
*/
|
||||
public class AnimatedImageSourceActivity extends AppCompatActivity implements OnMapReadyCallback {
|
||||
@@ -95,7 +95,9 @@ public class AnimatedImageSourceActivity extends AppCompatActivity implements On
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
mapView.onStop();
|
||||
handler.removeCallbacks(runnable);
|
||||
if (handler != null) {
|
||||
handler.removeCallbacks(runnable);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -76,8 +76,8 @@ public class CircleLayerActivity extends AppCompatActivity implements View.OnCli
|
||||
mapboxMap = map;
|
||||
|
||||
mapboxMap.setStyle(Style.SATELLITE_STREETS, style -> {
|
||||
addBusStopSource();
|
||||
addBusStopCircleLayer();
|
||||
addBusStopSource(style);
|
||||
addBusStopCircleLayer(style);
|
||||
initFloatingActionButtons();
|
||||
isLoadingStyle = false;
|
||||
});
|
||||
@@ -89,22 +89,22 @@ public class CircleLayerActivity extends AppCompatActivity implements View.OnCli
|
||||
});
|
||||
}
|
||||
|
||||
private void addBusStopSource() {
|
||||
private void addBusStopSource(Style style) {
|
||||
try {
|
||||
source = new GeoJsonSource(SOURCE_ID, new URL(URL_BUS_ROUTES));
|
||||
} catch (MalformedURLException exception) {
|
||||
Timber.e(exception, "That's not an url... ");
|
||||
}
|
||||
mapboxMap.getStyle().addSource(source);
|
||||
style.addSource(source);
|
||||
}
|
||||
|
||||
private void addBusStopCircleLayer() {
|
||||
private void addBusStopCircleLayer(Style style) {
|
||||
layer = new CircleLayer(LAYER_ID, SOURCE_ID);
|
||||
layer.setProperties(
|
||||
circleColor(Color.parseColor("#FF9800")),
|
||||
circleRadius(2.0f)
|
||||
);
|
||||
mapboxMap.getStyle().addLayerBelow(layer, "waterway-label");
|
||||
style.addLayerBelow(layer, "waterway-label");
|
||||
}
|
||||
|
||||
private void initFloatingActionButtons() {
|
||||
|
||||
Reference in New Issue
Block a user