I would like to implement this in my app, but I have no idea of how to make the marker have a button, or how to have the OnMarkerClickListener tell me what part it clicked on.
As an example, here is the official Maps app, where the directions icon is a separate part/button and the right side shows reviews.
I assume you are using the new version of the Google Maps Android API
While you can set an info window to be an arbitrary view using GoogleMap.setInfoWindowAdapter()
, the info window that is rendered on the map is not a live view. Instead, it is a snapshot of the view at the time the view was returned by the adapter. So, unfortunately there is currently no way to distinguish between click events on the info window.
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