ArcGIS Api For Android学习之(二)加载地图续-加载sd卡中的切片数据

0
分享 2014-01-29
1. 把ArcGIS Server的服务切片文件拷贝到AndRoid设备SD卡的根目录下.



2. 在在eclipse中新建项目,核心代码如下:

publicclass LocalTiledLayer extends Activity{



MapViewmap = null;

ArcGISLocalTiledLayerlocal;



/** Called when the activity is firstcreated. */

publicvoid onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.main);

map = (MapView) findViewById(R.id.map);



//the data is stored on the SDCARD

//the data is created as a tiled cache

local = new ArcGISLocalTiledLayer(“file:///mnt/sdcard/idw/图层“);

map.addLayer(local);





}

}
文章来源:http://blog.csdn.net/sydbc/article/details/17137945

0 个评论

要回复文章请先登录注册