Working with the map toolbar
In the previous chapters, we worked with markers and a lite map. While working with markers, you may have noticed that when you click on one, two icons appear at the bottom right-hand corner. This is the map toolbar. When you click on the map toolbar, it opens the Google Maps application. The map toolbar disappears when the marker is out of focus.
This toolbar also appears in the lite mode by default.
The following screenshot displays the map toolbar in the bottom right-hand corner as the marker is clicked on:
If we do not want to display the map toolbar, we can disable it by calling the setMapToolbarEnabled()
method on the UiSettings
class by passing the Boolean value as false
.
The code for the onMapReadyCallback()
method is as follows:
map.getUiSettings().setMapToolbarEnabled(false)