Android google maps marker disable navigation option

Sven van den Boogaart picture Sven van den Boogaart · May 20, 2015 · Viewed 16.2k times · Source

Im creating an app where users need to walk to a point on a map. But they need to find a route to the point by them selves. Ive created a map with markers but by default if a user clicks on the marker a "start navigation" and "view in google maps" option is shown. Is it possible to disable these options ?

The options that are shown on marker click

The options that are shown on marker click

Answer

Pavel Dudka picture Pavel Dudka · May 20, 2015

This thing is called Map Toolbar. You can disable it by calling UiSettings.setMapToolbarEnabled(false):

GoogleMap map;
....... //init map

map.getUiSettings().setMapToolbarEnabled(false);