I'm working in Android Studio with MapsActivity. Everything works fine, but how do I disable the map controls that show up on top of the Google map?
Here is my code:
public class MapsActivity extends FragmentActivity {
private GoogleMap mMap;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);
setUpMapIfNeeded();
}
@Override
protected void onResume() {
super.onResume();
setUpMapIfNeeded();
}
private void setUpMapIfNeeded() {
if (mMap == null) {
mMap = ((SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
if (mMap != null) {
setUpMap();
}
}
}
private void setUpMap() {
mMap.addMarker(new MarkerOptions()
.position(new LatLng(46.066185, 19.674654))
.title("Novo naselje okretnica ")
.icon(BitmapDescriptorFactory.fromResource(R.drawable.bluebus2)));
}
Check out the image, to see what I'm talking about.
So there is the problem, I don't want those map controls. Please help me figure out how to disable this. Thx :)