Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Google map version-2 show direction and Google map icon

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.

enter image description here

How to hide direction and Google map icon from map fragment?

like image 633
M.A.Murali Avatar asked Mar 25 '15 11:03

M.A.Murali


1 Answers

Google Map provides a simple boolean method for this:

gmap.getUiSettings().setMapToolbarEnabled(false);

And You are done.

like image 75
Sagar Shah Avatar answered Sep 17 '22 20:09

Sagar Shah