Google Maps remove marker route context menu
Asked Answered
V

1

8

I started a new project with the Google Maps template of Android Studio and just added a marker to the map.

LatLng location = new LatLng(lat, lng);
Marker marker = mMap.addMarker(new MarkerOptions()
            .position(location)
            .icon(BitmapDescriptorFactory.fromResource(R.drawable.marker)));

When I click the Marker there comes a little menu with a Google Maps icon on the bottom right corner:

the menu on the bottom right

How can I get rid of this thing? I couldn't find anything I even don't know how to call it but I really need to get rid of it.

Valine answered 7/2, 2015 at 2:17 Comment(1)
damn... I just didn't have seen it: mMap.getUiSettings().setMapToolbarEnabled(false);Valine
L
9

You need to call setMapToolbarEnabled method of UiSettings

Like this:

@Override
public void onMapReady(GoogleMap googleMap) {
    googleMap.getUiSettings().setMapToolbarEnabled(false);

    // Do other staff
}
Labelle answered 15/1, 2016 at 11:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.