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
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.
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."
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.
This thing is called Map Toolbar. You can disable it by calling UiSettings.setMapToolbarEnabled(false):
GoogleMap map; ....... //init map map.getUiSettings().setMapToolbarEnabled(false);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With