How to make google map several markers infowindow remains open android

I want the info window open on the marker to remain open, even if a different marker is indicated on the google map. here is my code.

private void drawMarker(LatLng point, String pLoc){ // Creating an instance of MarkerOptions MarkerOptions markerOptions = new MarkerOptions().icon(BitmapDescriptorFactory.fromResource(R.drawable.map_pin_green)); // Setting latitude and longitude for the marker markerOptions.position(point); markerOptions.title(pLoc); // Adding the marker to the map m_cGoogleMap.addMarker(markerOptions).showInfoWindow(); m_cGoogleMap.setInfoWindowAdapter(new MarkerInfoWindowAdapter(null)); } 

I call this simple method to add multiple markers. using the showInfoWindow() method, the info window for the current marker simply opens, but I want the info window to remain open for the current and previous markers (several) all the time.

Please help me!

Thanks.

+4
source share
1 answer

According to the official documentation here . It says:

Only one information window is displayed at a time. If the user clicks on another marker, the current information window will be hidden and a new information window will be displayed.

So, if you want to display more information for your marker, you can use the android-maps-utils library. For more information see here .

+6
source

All Articles