【发布时间】:2020-01-29 18:12:36
【问题描述】:
LatLngBounds bounds = builder.build();
int width = getResources().getDisplayMetrics().widthPixels;
int height = getResources().getDisplayMetrics().heightPixels;
int padding = (int) (width * 0.10); // offset from edges of the map 10% of screen
CameraUpdate cu = CameraUpdateFactory.newLatLngBounds(bounds, width, height, padding);
mMap.animateCamera(cu)
您可以查看下面的附加图片。
【问题讨论】:
-
我认为您需要提供更多的最小示例来尝试重现您的问题
-
已应用此代码,但每次标记都未设置在地图中心。 @Amitpandey
标签: java android google-maps kotlin