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

标签 java android google-maps overlay android-mapview

我正在 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/

相关文章:

java - 结束 Mac OS X 上正在使用该文件的进程

JavaFX:将图像插入 GridPane

java - Android SearchView.OnQueryTextListener() 意外启动 Intent

javascript - 使用 Google Maps JS API 随机拖动/平移

javascript - 更新热图数据,简单的 google HeatMap

java - 使用 Eclipse 测量下载速度

java - 如何在 Java 中向改造请求添加不记名 token

java - Android项目无法编译,构建路径错误?

当应用程序被杀死时,Android 小部件 PendingIntent 停止工作

angular - 如何将 Google map 与 Ionic 3 结合使用