相关疑难解决方法(0)

是否可以将尺寸设置为与地图缩放级别无关的groundOverlay?

我有一个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

5
推荐指数
1
解决办法
3073
查看次数