android地图视图问题

android地图视图问题,android,android-mapview,Android,Android Mapview,我想在地图视图图钉上显示一个简单的文本视图。单击该图钉后,我想显示详细信息 当用户点击特定点时,我想显示该点的名称。这些名称我存储在POJO类中,我想从中检索,现在在我的代码中,我成功地获得了名称,但唯一的问题是名称并没有显示在该点击点上 请帮忙 这是我的密码 @Override public boolean onTap(GeoPoint p, MapView mapView) { str. final Pop

我想在地图视图图钉上显示一个简单的文本视图。单击该图钉后,我想显示详细信息

当用户点击特定点时,我想显示该点的名称。这些名称我存储在POJO类中,我想从中检索,现在在我的代码中,我成功地获得了名称,但唯一的问题是名称并没有显示在该点击点上

请帮忙

这是我的密码

@Override
        public boolean onTap(GeoPoint p, MapView mapView) {          
            str.

            final PopupWindow popupWindow;
            LayoutInflater inflater = getLayoutInflater();
            View layout = inflater.inflate(R.layout.popup, (ViewGroup) findViewById(R.id.rootId));

            TextView text = (TextView)layout.findViewById(R.id.nameTextView);
            text.setText("Lake Name");
            text.setBackgroundColor(Color.BLACK);

            popupWindow=new PopupWindow(layout);
            popupWindow.setTouchable(true);
            popupWindow.setWidth(LayoutParams.WRAP_CONTENT);
            popupWindow.setHeight(LayoutParams.WRAP_CONTENT);
            popupWindow.showAtLocation(layout,Gravity.CENTER_HORIZONTAL,10,0);

            builder=new AlertDialog.Builder(DummyLocationActivity.this);
            text.setOnClickListener(new OnClickListener() {

                @Override
                public void onClick(View v) {

                    popupWindow.dismiss();
                    LayoutInflater inflater=LayoutInflater.from(DummyLocationActivity.this);

                View desc=  inflater.inflate(R.layout.description,(ViewGroup) findViewById(R.id.root));
                builder.setView(desc);

                builder.show();
                }


            });
            return true;
}

OnTapint position您可以使用position获取点击的特定项目