我正在 Google map 上显示自定义标记。它们放置得很好,但它们有一个有趣的阴影。如何去除阴影?
@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;
}
}
最佳答案
在调用重写的方法时,我会尝试为 shadow
参数传递 false
。
这意味着它应该看起来像 super.draw(canvas, mapView, false)
。
关于java - 如何去除 map 上标记上的阴影?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4201804/