Arcgis Runtime for andriod 100 加载geodatabase
Posted gisoracle
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Arcgis Runtime for andriod 100 加载geodatabase相关的知识,希望对你有一定的参考价值。
private void LoadMY()
{
try {
String mainGeodatabaseFilePath =
YLPub.getMapData() + "/gismap/sl.geodatabase";;
mMapView = (MapView) findViewById(R.id.mapView);
String tpk=YLPub.getMapData() + "/gismap/map.tpk";
TileCache vTileCache = new TileCache(tpk);
ArcGISTiledLayer mainArcGISTiledLayer = new ArcGISTiledLayer(vTileCache);
Basemap mainBasemap = new Basemap(mainArcGISTiledLayer);
pMap = new ArcGISMap(mainBasemap);
mMapView .setMap(pMap);
final Geodatabase mainGeodatabase = new Geodatabase(mainGeodatabaseFilePath);
mainGeodatabase.loadAsync();
mainGeodatabase.addDoneLoadingListener(new Runnable() {
@Override
public void run() {
List<GeodatabaseFeatureTable> resultsGFT = mainGeodatabase.getGeodatabaseFeatureTables();
int valueCount = resultsGFT.size();
for (int i = valueCount - 1; i > -1; i--) {
FeatureLayer valueFL = new FeatureLayer(resultsGFT.get(i));
valueFL.setVisible(true);
LayerList mainLayerList = pMap.getOperationalLayers();
mainLayerList.add(valueFL);
}
}
});
} catch (Exception e) {
}
}
以上是关于Arcgis Runtime for andriod 100 加载geodatabase的主要内容,如果未能解决你的问题,请参考以下文章
Arcgis Runtime for andriod 100 加载geodatabase
Arcgis Runtime for andriod 100 加载TPK
Arcgis Runtime for andriod 100 Simple marker symbol
ArcGIS Runtime for Android 5 加载地图