我在我的GoogleMap
上有一个GroundOverlay
,我希望当我放大/缩小地图时,它的尺寸不会改变,就像默认地图上的markers
一样始终保持它们的尺寸。我已经尝试使用GroundOverlay.setDimensions()
的两种形式,但是图像仍然会在缩放时调整大小。这是我的代码:
Bitmap btm = BitmapFactory.decodeResource(getResources(), R.drawable.map_arrow);
BitmapDescriptor arrow = BitmapDescriptorFactory.fromBitmap(btm);
float w = btm.getWidth();
float h = btm.getHeight();
if (groundOverlay != null) groundOverlay.remove();
groundOverlay = mMap.addGroundOverlay(new GroundOverlayOptions()
.image(arrow).position(meLoc, w,h).bearing(bearAngle));
groundOverlay.setDimensions(1000);