I would like to know if you can put event in Google Maps bookmarks to open a custom information window, such as a fragment, for example.
I would like to know if you can put event in Google Maps bookmarks to open a custom information window, such as a fragment, for example.
Use the setOnMarkerClickListener()
method of the map to "set" a OnMarkerClickListener that will have its onMarkerClick()
method called when the user clicks on it.
GoogleMap googleMap;
googleMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {
@Override
public boolean onMarkerClick(Marker marker) {
}
The object received in the parameter marker
is the Marker clicked.
See Marker click events in the documentation.