我怎样才能去除阴影在我的地图标记?我的、标记、阴影、地图

由网友(少年自毁梦)分享简介:我上显示我的谷歌地图自定义的标记。它们被放置好,但他们有这个有趣的阴影。我怎样才能去除阴影? @覆盖        公共布尔平局(帆布帆布,MapView类MapView类,布尔阴影,长时){            super.draw(画布,MapView类,阴影);            // ---翻译的Ge...

我上显示我的谷歌地图自定义的标记。它们被放置好,但他们有这个有趣的阴影。我怎样才能去除阴影?

  @覆盖        公共布尔平局(帆布帆布,MapView类MapView类,布尔阴影,长时){            super.draw(画布,MapView类,阴影);            // ---翻译的GeoPoint到屏幕像素---            点screenPts =新点();            。MapView.getProjection()在toPixels(geoPnt,screenPts);            // ---添加标记---            / * BMP位图= BitmapFactory.de codeResource(getResources(),R.drawable.pushpin);            canvas.drawBitmap(BMP,screenPts.x,screenPts.y  -  67,NULL); * /            返回true;        }    } 

解决方案

我想尝试通过阴影参数调用重写的方法时。

这意味着它应该看起来像 super.draw(画布,MapView类,FALSE)

ArcGIS实用制图技巧 如何制作 阴影 效果

I am displaying a custom marker on my Google Map. They are placed fine, but they have this funny shadow. How can I remove the shadow?

@Override
        public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) {
            super.draw(canvas, mapView, shadow);

            // ---translate the GeoPoint to screen pixels---
            Point screenPts = new Point();
            mapView.getProjection().toPixels(geoPnt, screenPts);

            // ---add the marker---
            /*Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.pushpin);
            canvas.drawBitmap(bmp, screenPts.x, screenPts.y - 67, null);*/
            return true;
        }
    }

解决方案

I'd try to pass false for the shadow parameter when invoking the overridden method.

That means it should look like super.draw(canvas, mapView, false).

阅读全文

相关推荐

最新文章