我正在研究mapbox android。我需要在加载活动时将信息窗口显示在所有标记的顶部,而无需单击标记以查看每个信息窗口。如何在 mapbox 中实现此功能?
这是代码: -
mapView.getMapAsync(new OnMapReadyCallback() {
@Override
public void onMapReady(final MapboxMap map) {
mapboxMap = map;
mapboxMap.addMarker(new MarkerOptions()
.title("hello")
.snippet("I am here")
.position(new LatLng(33.948,-118.08)));
mapboxMap.setInfoWindowAdapter(new MapboxMap.InfoWindowAdapter() {
@Nullable
@Override
public View getInfoWindow(@NonNull Marker marker) {
//What do I give here so that marker click is not at all needed to inflate the Infowindow.
return null;
}
});
)
});