如何在Android地图上使用叠加层添加标记?

时间:2012-07-19 13:37:23

标签: android

我想在Android地图中使用Overlay在Google地图上添加标记...我的代码位于

之下
@Override
    public boolean draw(Canvas canvas, MapView mapView, boolean shadow,
            long when) {
          Point screenPts = new Point(); mapView.getProjection().toPixels(p1,
          screenPts);
          //---add the marker--- 
          Bitmap bmp = BitmapFactory.decodeResource(getResources()
          , R.drawable.googlepin); ``
          canvas.drawBitmap(bmp, screenPts.x,
          screenPts.y-50, null);
                  }
        return super.draw(canvas, mapView, shadow, when);
    }

在getResources()下提供RedLine ....给予任何建议.....提前谢谢..

0 个答案:

没有答案