我有一个GroundOverlay
在我身上GoogleMap
,我希望当我在地图上放大/缩小时它的尺寸不会改变.完全像默认地图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);
Run Code Online (Sandbox Code Playgroud) android google-maps overlay zooming google-maps-android-api-2