java如何删除地图标记上的阴影?
我正在谷歌地图上显示一个自定义标记。它们的位置很好,但它们有一个有趣的影子。我怎样才能消除阴影
@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;
}
}
# 1 楼答案
调用重写的方法时,我会尝试为
shadow
参数传递false
这意味着它应该看起来像
super.draw(canvas, mapView, false)
# 2 楼答案
试试这个: