gpt4 book ai didi

java - 如何去除 map 上标记上的阴影?

转载 作者:行者123 更新时间:2023-12-01 07:41:39 24 4
gpt4 key购买 nike

我正在 Google map 上显示自定义标记。它们放置得很好,但它们有一个有趣的阴影。如何去除阴影? alt text

@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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com