3
I wonder if there is a way to put event in Google Maps markers to open a custom information window, such as a Fragment, for example.
3
I wonder if there is a way to put event in Google Maps markers to open a custom information window, such as a Fragment, for example.
4
Use the method setOnMarkerClickListener()
, from the map, to "set" a Onmarkerclicklistener who will have his methodonMarkerClick()
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 that of Marker clicked.
Behold Marker click Events in the documentation.
Browser other questions tagged android google-maps-android-api-2
You are not signed in. Login or sign up in order to post.