Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android google maps marker disable navigation option

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

like image 698
Sven van den Boogaart Avatar asked May 20 '15 15:05

Sven van den Boogaart


People also ask

How do I change the marker on Google Maps Android?

For adding a custom marker to Google Maps navigate to the app > res > drawable > Right-Click on it > New > Vector Assets and select the icon which we have to show on your Map. You can change the color according to our requirements. After creating this icon now we will move towards adding this marker to our Map.

How do I turn off auto navigation on Android?

To stop navigation at any point: On the top right of your device, say "Ok Google," or tap Microphone. . Say "Stop Navigation" or "Cancel navigation."

How do I hide the default marker on Google Maps?

Just set clickableIcons: false in the options you initialise the Map with. I added an example, you have to zoom enough to see those points. Thank you! These POI's should be turned off by default in the APi.


1 Answers

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

GoogleMap map; ....... //init map  map.getUiSettings().setMapToolbarEnabled(false); 
like image 68
Pavel Dudka Avatar answered Sep 28 '22 08:09

Pavel Dudka