arcgis andriod 加载影像

arcgis andriod 加载影像

MapView mMapView;
......
String rasterPath = Environment.getExternalStorageDirectory().getPath() + "/raster/test.tif";
FileRasterSource rasterSource;
try {
rasterSource = new FileRasterSource(rasterPath);
} catch (IllegalArgumentException ie) {
Log.d(TAG, "null or empty path");
} catch (FileNotFoundException fe) {
Log.d(TAG, "raster file doesn't exist");
} catch (RuntimeException re) {
Log.d(TAG, "raster file can't be opened");
}
RasterLayer rasterLayer = new RasterLayer(rasterSource);
mMapView.addLayer(rasterLayer);