I want to make the info Window opened on a marker to stay opened even when another marker is pointed on google map. here's 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'm calling this simple method to add multiple markers. using the showInfoWindow()
method just opens the info Window for the current marker, But I want the info Window to stay opened for current and previous markers(Multiple) all time.
Please help me out!!
Thank you.
According to official documentation here. It says:
Only one info window is displayed at a time. If a user clicks on another marker, the current info window will be hidden and the new info window will be displayed.
So if you want to display more information for you marker, you may consider to use android-maps-utils
library. For more details, please refer to here.
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