80,471
社区成员




private MapView mapView = null;
private ArcGISLocalTiledLayer local = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
/*
this.mapView = (MapView)this.findViewById(R.id.map);//设置UI和代码绑定
String strMapUrl="http://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineCommunity/MapServer";
ArcGISTiledMapServiceLayer arcGISTiledMapServiceLayer = new ArcGISTiledMapServiceLayer(strMapUrl);
this.mapView.addLayer(arcGISTiledMapServiceLayer);
*/
String pathName = getSDPath()+"/arcgis/neimeng/Layers";
try
{
String inPath = Environment.getExternalStorageDirectory().getPath();
List<String> outPath = getExtSDCardPath();
Log.d("aaaaa","onCreate:++++++++++++++++++"+outPath.size());
for(String s : outPath){
Log.d("aaaaa","onCreate:++++++++++++++++++"+s);
}
Log.d("aaaaa","onCreate: ------------------------------------"+inPath);
File f=new File(pathName);
if(f.exists())
{
Log.d("","onCreate: ------------------------------------"+f.exists());
local = new ArcGISLocalTiledLayer("file://"+pathName);
mapView.addLayer(local);
}
}
catch (Exception e)
{
}
}