#1856 - Setting map style programmatically and setting corresponding menu item checked
This commit is contained in:
@@ -112,6 +112,9 @@ public class MainActivity extends AppCompatActivity {
|
||||
mapView.setOnFpsChangedListener(new MyOnFpsChangedListener());
|
||||
mapView.addOnMapChangedListener(new MyOnMapChangedListener());
|
||||
|
||||
changeMapStyle(getString(R.string.styleURLMapboxStreets));
|
||||
navigationView.getMenu().findItem(R.id.actionStyleMapboxStreets).setChecked(true);
|
||||
|
||||
final GestureDetector gestureDetector = new GestureDetector(this, new GestureDetector.SimpleOnGestureListener() {
|
||||
public void onLongPress(final MotionEvent e) {
|
||||
float x = e.getX();
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
android:id="@+id/mainMapView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
mapbox:styleUrl="asset://styles/mapbox-streets-v7.json"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
|
||||
Reference in New Issue
Block a user