I have a map in my android application with several markers. When I click on any of the markers the info window appears and also a directions button on the bottom right hand side corner just like the picture below shows.
The problem is that I also open the info window programmatically based on user inputs within the app. I do this using marker.showInfoWindow() but this way it doesn't show the directions button. I have googled around and not found anyone with a similar issue, was hoping there was a way for the button to appear and if so how?
Show activity on this post. The following example shows a simple Marker (standard icon) on Google maps for the location and when clicking the icon, it opens the info window.
To add an event, head to Google Maps on Android, tap on Contribute >Events > Add a public event. You can add an event name, tag the location, and add the time and date of the event as well. There's an option to add an image, write more event details, and add description as well.
You need to do as follows:
GoogleMap myMap;
myMap.getUiSettings().setMapToolbarEnabled(true);
You can get all sample project code on my github here and try yourself:)
Just long click on map to set up a marker, click it, show the infoWindow
, and finally, it will show the button.
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