Android MapView parts of map missing

本秂侑毒 提交于 2019-12-11 03:35:49

问题


Any thoughts of what that might be?

The only manipulation I did to the overlay was to draw the pointer in the middle.

The code follows

public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) {
    super.draw(canvas, mapView, shadow);
    Point myScreenCoords = new Point();
    mapView.getProjection().toPixels(point, myScreenCoords);

    Paint paint = new Paint();
    paint.setARGB(255, 255, 255, 255);

    Bitmap bmp = BitmapFactory.decodeResource(getResources(),
                    R.drawable.google_maps_marker);
    canvas.drawBitmap(bmp, myScreenCoords.x - (float)(bmp.getWidth() * 0.50),
                    myScreenCoords.y - bmp.getHeight(), paint);
    return true;
}

回答1:


I found the solution in another post (I was having the same problem).

MapView rendering with tiles missing with an "x" in the center

I commented out my setStreetView(true) and it fixed it.



来源:https://stackoverflow.com/questions/7848024/android-mapview-parts-of-map-missing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!