在android中跟标注有关的的代码:
mapView.getOverlays().add(new MyOverlayItem(getDrawable(R.mipmap.point_marker)));
class MyOverlayItem extends ItemizedOverlay {
private ArrayList<OverlayItem> mOverlayList = new ArrayList<OverlayItem>();
public MyOverlayItem(Drawable drawable) {
super(drawable);
double A =113.2;
double B =23.02;
Point2D point2D = new Point2D( A , B);
mOverlayList.add(new OverlayItem( point2D, "A", "B"));
}
@Override
protected OverlayItem createItem(int i) {
return mOverlayList.get(i) ;
}
@Override
public int size() {
return mOverlayList.size();
}
}
标记的图片我放在mipmap-hdpi目录下,运行的时候没报错,但是就是不显示标记,求解决!