[android] - introduce MapboxMapOptins facility creation method.
This commit is contained in:
@@ -105,7 +105,7 @@ class NestedViewPagerActivity : AppCompatActivity() {
|
||||
class MapPagerAdapter(private val context: Context, fm: FragmentManager?) : FragmentStatePagerAdapter(fm) {
|
||||
|
||||
override fun getItem(position: Int): Fragment {
|
||||
val options = MapboxMapOptions.createFromAttributes(context, null)
|
||||
val options = MapboxMapOptions.createFromAttributes(context)
|
||||
options.textureMode(true)
|
||||
options.doubleTapGesturesEnabled(false)
|
||||
options.rotateGesturesEnabled(false)
|
||||
|
||||
@@ -45,7 +45,7 @@ class ViewPagerActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
override fun getItem(position: Int): Fragment? {
|
||||
val options = MapboxMapOptions.createFromAttributes(context, null)
|
||||
val options = MapboxMapOptions.createFromAttributes(context)
|
||||
options.textureMode(true)
|
||||
options.camera(
|
||||
CameraPosition.Builder()
|
||||
|
||||
@@ -133,7 +133,7 @@ public class BottomSheetActivity extends AppCompatActivity {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt("mapcounter", mapCounter);
|
||||
mapFragment.setArguments(bundle);
|
||||
MapboxMapOptions mapboxMapOptions = MapboxMapOptions.createFromAttributes(context, null);
|
||||
MapboxMapOptions mapboxMapOptions = MapboxMapOptions.createFromAttributes(context);
|
||||
mapFragment.setArguments(MapFragmentUtils.createFragmentArgs(mapboxMapOptions));
|
||||
return mapFragment;
|
||||
}
|
||||
@@ -211,7 +211,7 @@ public class BottomSheetActivity extends AppCompatActivity {
|
||||
|
||||
public static BottomSheetFragment newInstance(Context context) {
|
||||
BottomSheetFragment mapFragment = new BottomSheetFragment();
|
||||
MapboxMapOptions mapboxMapOptions = MapboxMapOptions.createFromAttributes(context, null);
|
||||
MapboxMapOptions mapboxMapOptions = MapboxMapOptions.createFromAttributes(context);
|
||||
mapboxMapOptions.renderSurfaceOnTop(true);
|
||||
mapFragment.setArguments(MapFragmentUtils.createFragmentArgs(mapboxMapOptions));
|
||||
return mapFragment;
|
||||
|
||||
@@ -117,7 +117,7 @@ public class SymbolLayerActivity extends AppCompatActivity implements MapboxMap.
|
||||
setContentView(R.layout.activity_symbollayer);
|
||||
|
||||
// Create map configuration
|
||||
MapboxMapOptions mapboxMapOptions = MapboxMapOptions.createFromAttributes(this, null);
|
||||
MapboxMapOptions mapboxMapOptions = MapboxMapOptions.createFromAttributes(this);
|
||||
mapboxMapOptions.camera(new CameraPosition.Builder().target(
|
||||
new LatLng(52.35273, 4.91638))
|
||||
.zoom(13)
|
||||
|
||||
Reference in New Issue
Block a user