In my Android application my map screen shows direction and Google map when click marker on the map. I use the following in my application.
XML:
<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.MapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
In code:
GoogleMap googleMap = ((MapFragment) getFragmentManager().findFragmentById(
R.id.map)).getMap();
I have marked the direction and Google map icon marked in blue color. please see the image of my map screen.
How to hide direction and Google map icon from map fragment?
Google Map provides a simple boolean method for this:
gmap.getUiSettings().setMapToolbarEnabled(false);
And You are done.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With