• 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 + "
    ";
                            }
                        }
                        pFeatureLayer.selectFeature(pFeature.getId());
                        ShowMessage(str);
                    }
                }
    }
  • 相关阅读:
    Java中的synchronized以及读写锁
    Java中的HashMap低层实现原理
    AOP
    PageRank算法
    Python基础
    RF创建测试库
    RF-RequestsLibrary
    selenium webdriver
    RF开发关键字(四)
    RF关键字(三)
  • 原文地址:https://www.cnblogs.com/gisoracle/p/5250902.html
Copyright © 2020-2023  润新知