安卓智能地图开发与实施二十五:Shapefile文件的可视化与编辑 - ArcGIS Runtime SDK for Android(Version 100.2.0)

本文介绍了如何在安卓上使用ArcGIS Runtime 100.2.0对Shapefile文件进行可视化和编辑。通过ShapefileFeatureTable加载Shapefile文件,并利用FeatureLayer和FeatureTable进行数据查询和编辑操作。文章还提供了编辑操作的示例代码,并提供了源程序下载链接。
摘要由CSDN通过智能技术生成

Shapefile文件的可视化与编辑

这里写图片描述

ArcGIS Runtime 100.2.0的正式发布带来个更多移动端的处理地图的能力,例如支持WMS图层、支持海图(ENC)图层,再如基于场景相机(Camera)的视域分析。同时还提供了新的统计查询API(总和,平均值,计数,最小值,最大值,标准差或方差)。而今天要描述的重点是ArcGIS Runtime 100.2.0对Shapefile数据格式的支持,当然ArcGIS Runtime 100.2.0还增加了对OGC GeoPackage格式的支持。

Shapefile文件的可视化

我们都知道Shapefile文件是Esri创造的开源空间数据格式,简单的介绍如下。
这里写图片描述

在安卓端加载Shapefile文件的关键是ShapefileFeatureTable(com.esri.arcgisruntime.data.ShapefileFeatureTable)。代码如下

private void showShapefile() {
    mainMapView = (MapView) findViewById(R.id.mapView);
    mainMapView.setAttributionTextVisible(false);
    mainArcGISMap = new ArcGISMap(new Basemap().createImageryWithLabelsVector());
    mainMapView.setMap(mainArcGISMap);
    final ShapefileFeatureTable shapefileFeatureTable = new ShapefileFeatureTable(
            getResources().getString(R.string.shapefile_path)
    );
    shapefileFeatureTable.loadAsync();
    shapefileFeatureTable.addDoneLoadingListener(new Runnable() {
        @Override
        public void run() {
            GeometryType gt = shapefileFeatureTable.getGeometryType();
            String name = shapefileFeatureTable.getTableName();
            String name1 = name;
            mainShap
评论 25
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

虾神说D

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值