Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps remove marker route context menu

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.

like image 308
Informatic0re Avatar asked Feb 07 '15 02:02

Informatic0re


People also ask

How do I get rid of blue markers on Google Maps?

If you want to remove the pin from Google Maps, simply right click on it and select "Remove this destination." Poof, it's gone.

How do I get rid of green markers on Google Maps?

After a place name is typed into the Google Search bar, the green marker appears at that location. To delete it, before clicking on (+Add to map), look at the map legend, near the top, above all of the layer definitions. and you will see the green marker. Click on the X just above the marker to delete it.

How do I change the marker on Google Maps?

Call the changeMarkerPosition() function and pass the marker object in it. The setPosition() will change the marker position on google map based on the specified latitude and longitude.


1 Answers

You need to call setMapToolbarEnabled method of UiSettings

Like this:

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

    // Do other staff
}
like image 116
Sergey Pekar Avatar answered Oct 16 '22 21:10

Sergey Pekar