我可以从 ArcGIS Android SDK-100.1.0 下载地图,但之后我将如何编辑此地图,即添加或删除标记点,在此编辑之后,我需要将离线编辑数据同步到 ArcGIS Map 服务器。这是我的离线地图代码-
private MapView mMapView;
private ArcGISMap map;
private ArcGISTiledLayer tiledLayer;
private Geodatabase geodatabase;
private Activity activity;
public void loadOfflineMap() {
Toast.makeText(activity, activity.getFilesDir().getAbsolutePath(), Toast.LENGTH_LONG).show();
//--- get links to cached resources
String strTpkPath = activity.getFilesDir().getAbsolutePath()+"/tiles.tpk";
String strGeoDbPath = activity.getFilesDir().getAbsolutePath()+"/layers.geodatabase";
File sdCard = Environment.getExternalStorageDirectory();
File dir = new File (sdCard.getAbsolutePath() + "/arcGIS");
dir.mkdir();
File file = new File(sdCard.getAbsolutePath() + "/testfile.txt");
if (!file.exists()) {
try {
file.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
}
//--- create a tiled layer using the tile package
TileCache tileCache = new TileCache(strTpkPath);
tiledLayer = new ArcGISTiledLayer(tileCache);
//--- set tiled layer as basemap
Basemap basemap = new Basemap(tiledLayer);
//--- create a map with the basemap
map = new ArcGISMap(basemap);
mMapView.setMap(map);
//--- instantiate geodatabase with name
geodatabase = new Geodatabase(strGeoDbPath);
//--- load the geodatabase for feature tables
geodatabase.loadAsync();
//--- add feature layer from geodatabase to the ArcGISMap
geodatabase.addDoneLoadingListener(new Runnable() {
@Override
public void run() {
for (GeodatabaseFeatureTable geoDBTable: geodatabase.getGeodatabaseFeatureTables()) {
mMapView.getMap().getOperationalLayers().add(new FeatureLayer(geoDBTable));
}
}
});
}
我无法使用此版本的 ArcGIS SDK 找到任何解决方案。请帮我。