使用带有GroundOverlay的2616x5952图像(3MB)时出现OutOfMemoryError。我的代码是:
mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))
.getMap();
mMap.setMyLocationEnabled(true);
BGN = new LatLng(32.013111, 34.875231);
Bitmap image = BitmapFactory.decodeResource(getResources(),
R.drawable.lower_ats);
BitmapDescriptor map = BitmapDescriptorFactory.fromBitmap(image);
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(BGN, 11));
GroundOverlayOptions overlay = new GroundOverlayOptions()
.image(map)
.positionFromBounds(
new LatLngBounds(new LatLng(29.250000, 33.750000),
new LatLng(33.500000, 35.916667)))
.transparency((float) 0.3).visible(true);
mMap.clear();
GroundOverlay imageOverlay = mMap.addGroundOverlay(overlay);
设置位图时只会崩溃。谷歌没有解决方案,其他任何问题都没有答案。请帮帮我!
感谢。
编辑:除了TileOverlay还有其他方法吗?