MarkerOptions marker = new MarkerOptions().position(geom.get(0)).title(id).visible(true);
googleMap.addMarker(marker).showInfoWindow();
I have trying with this code but unable to keep the infowindow in open mode on map click.
MarkerOptions marker = new MarkerOptions().position(geom.get(0)).title(id).visible(true);
googleMap.addMarker(marker).showInfoWindow();
I have trying with this code but unable to keep the infowindow in open mode on map click.
Try this , If infowindow is closed on map click , show it again
mGoogleMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {
@Override
public void onMapClick(LatLng latLng) {
//mMarker is the shown marker
if (mMarker != null)
mMarker.showInfoWindow();
}
});
try this
map.setOnMapClickListener(new GoogleMap.OnMapClickListener() {
@Override
public void onMapClick(LatLng latLng) {
if (marker.isInfoWindowShown()==true)
{
marker.hideInfoWindow();
}
}
});