我正在尝试在回收站视图中充气地图
我很成功,但当我尝试在latlng
中设置onBindViewHolder
界限时
使用
LatLngBounds.Builder builder = new LatLngBounds.Builder();
builder.include(latLng_source);
builder.include(latLng_destination);
LatLngBounds bounds = builder.build();
int padding = 0;
CameraUpdate cu = CameraUpdateFactory.newLatLngBounds(bounds, padding);
我收到以下错误
Error using newLatLngBounds(LatLngBounds, int): Map size can't be 0. Most likely, layout has not yet occured for the map view. Either wait until layout has occurred or use newLatLngBounds(LatLngBounds, int, int, int) which allows you to specify the map's dimensions.