首页 / 浏览问题 / 移动GIS / 问题详情
请教添加一个callout,已设置经纬度,如何改变经纬度刷新其位置?
5EXP 2023年07月11日

请教添加一个callout,已设置经纬度,如何改变经纬度刷新其位置?这样写 好像不行,有没有更好的方式?感谢

 CallOut callOut ;

    private void showPointByCallout(Point2D point, final String pointName,
                                    final int idDrawable,double ratation) {
        if(null == callOut){
            callOut =  new CallOut(this);
            callOut.setStyle(CalloutAlignment.BOTTOM);
            callOut.setCustomize(true);

            ImageView imageView = new ImageView(this);
            imageView.setBackgroundResource(idDrawable);
            imageView.setRotation((float) ratation);
            callOut.setContentView(imageView);
            m_MapView.addCallout(callOut, pointName);
        }
        callOut.setLocation(point.getX(), point.getY());
//        m_Map.setCenter(point);
        m_MapView.refresh();
    }

1个回答

您好,先用mapview.addcallout(Callout callOut, java.lang.String name)根据指定的名称添加点标注控件,再用mapview.getcallout(java.lang.String name)根据名称获取点标注控件。然后再修改坐标呢

3,425EXP 2023年07月11日
感谢!!
...