arcgis andriod 长按获得当前信息

Posted gisoracle

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了arcgis andriod 长按获得当前信息相关的知识,希望对你有一定的参考价值。

 //      长按显示鼠标点坐标及比例尺
    private class myLongPressListener implements OnLongPressListener {
        private static final long serialVersionUID = 1L;

        @Override
        public boolean onLongPress(float x, float y) {


            if (pFeatureLayer != null) {
                pFeatureLayer.clearSelection();

                //执行选择查询操作
                long[] pLong = pFeatureLayer.getFeatureIDs(x, y, 10);
                if (pLong.length > 0) {
                    Feature pFeature = pFeatureLayer.getFeature(pLong[0]);
                    List<com.esri.core.map.Field> pList = pFeatureLayer.getFeatureTable().getFields();
                    String str = "";
                    int num = pList.size();
                    for (int j = 0; j < num; j++) {
                        String FieldName = pList.get(j).getName();
                        str = str + "字段:" + FieldName + ",值:" + pFeature.getAttributeValue(FieldName).toString();
                        if (j < num - 1) {
                            str = str + "\n";
                        }
                    }
                    pFeatureLayer.selectFeature(pFeature.getId());
                    ShowMessage(str);
                }
            }
}

 

以上是关于arcgis andriod 长按获得当前信息的主要内容,如果未能解决你的问题,请参考以下文章

andriod arcgis保存Mapview为图片

arcgis andriod Edit features

arcgis andriod GeometryEngine使用

arcgis andriod 点击后变色

andriod arcgis createPolygons创建带空的面

Arcgis Runtime for andriod 100 加载geodatabase