How to disable the map rotation feature in the Android Map Fragment

It turned out to be straight forward if you look into the right place in documentation. There is a UiSettings class inside a GoogleMap that allows enabling and disabling of gestures. SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.maps_fragment); GoogleMap map = mapFragment.getMap(); map.getUiSettings().setRotateGesturesEnabled(false);

Should I use MapView or MapFragment

First of all, soon the MapView and Google Maps API V1 will stop being supported and won’t receive any new updates. And soon all the support will go away. Secondly, MapFragment may be a little bit less flexible right now, but the map presented, manipulated a looks much better. And I guess that it’s functionality … Read more

Moving MapFragment (SurfaceView) causes black background flickering

Of course the proper solution will be for Google to fix the problem (see Android Maps V2 issue 4639: http://code.google.com/p/gmaps-api-issues/issues/detail?id=4639). However, one of my coworkers suggested simply extending the map beyond its container. If we extend the map fragment beyond the visible region of its container, like so: android:layout_marginLeft=”-40dp” android:layout_marginRight=”-40dp” we can reduce/eliminate the flickering. … Read more

tech