在nutiteq中将大量Points作为VectorDataSource处理

时间:2016-11-01 13:21:59

标签: android dictionary nutiteq

你好,每个人都希望你度过愉快的一天

为了加载大量的标记(例如1mil),我将MapPos列表传递给VectorDataSource,并尝试强制它生效创建点,只要相关坐标现在必须对地图可见,但不幸的是经过一些尝试似乎我不太了解地图。你能帮我解决这个难题吗? thaanks很多

 public static void createlustering(Projection proj,MapView mapView,Context context,final Bitmap bmp,float distance,float textSize,final ArrayList<MapPos> points){

         AbstractVectorDataSource<Geometry> source = new AbstractVectorDataSource<Geometry>(proj) {

            @Override
            public Collection<Geometry> loadElements(CullState arg0) {

                //what to do here

                return list;
            }

            @Override
            public Envelope getDataExtent() {

                //what to do here
                return null;
            }
        };
        // source.addAll(points);

         Clusterer mClusterer = new Clusterer();
         mClusterer.addPointCluster(mapView, context,source,bmp,distance,textSize);

     }

1 个答案:

答案 0 :(得分:0)

不幸的是,加载群集的数量有点大。但是,更具可扩展性的解决方案是将它们加载到您的CARTO帐户并从那里查询(使用概览)。

比照android示例:CartoDBSQLDataSourceCartoSQLActivity

此外,如果您打开升级SDK版本,可以查看较新的示例(主分支)