缺少地图Android的MapView的部分 [英] Android MapView parts of map missing

查看:123
本文介绍了缺少地图Android的MapView的部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么的,可能是有什么想法?

我没有到覆盖的唯一操作是提请中间的指针。

在code如下

 公共布尔平局(帆布帆布,MapView类MapView类,布尔阴影,长时){
    super.draw(画布,MapView类,阴影);
    点myScreenCoords =新点();
    MapView.getProjection()在toPixels(点,myScreenCoords)。    涂料粉刷=新的油漆();
    paint.setARGB(255,255,255,255);    BMP位图= BitmapFactory.de codeResource(getResources()
                    R.drawable.google_maps_marker);
    canvas.drawBitmap(BMP,myScreenCoords.x - (浮点)(bmp.getWidth()* 0.50)
                    myScreenCoords.y - bmp.getHeight(),漆);
    返回true;
}


解决方案

我发现在另一篇文章的溶液(我有同样的问题)。

<一个href=\"http://stackoverflow.com/questions/7478952/mapview-rendering-with-tiles-missing-with-an-x-in-the-center\">MapView瓷砖与失踪渲染英寸×&QUOT;在中心

我评论了我的setStreetView(真),并固定它。

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;
}

解决方案

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.

这篇关于缺少地图Android的MapView的部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆