如何使 google 映射多个标记的信息窗口保持打开状态 android
How to make google map multiple marker's infowindow stays opened android
我想让 Window 在标记上打开的信息即使在 google 地图上指向另一个标记时也能保持打开状态。这是我的代码。
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));
}
我正在调用这个简单的方法来添加多个标记。使用 showInfoWindow()
方法只是打开当前标记的信息 Window,但我希望信息 Window 始终为当前和以前的标记(多个)保持打开状态。
请帮帮我!!
谢谢。
我想让 Window 在标记上打开的信息即使在 google 地图上指向另一个标记时也能保持打开状态。这是我的代码。
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));
}
我正在调用这个简单的方法来添加多个标记。使用 showInfoWindow()
方法只是打开当前标记的信息 Window,但我希望信息 Window 始终为当前和以前的标记(多个)保持打开状态。
请帮帮我!!
谢谢。