您好,常规的初始化工作空间,如下代码,其实也没有加载map,那个getCount返回为0。有可能出现ANR,特别是在调试一段时间,手机可能有点发热的情况下,出现的频率更高,请问有没有优化解决的措施?
mworkspace = new Workspace();
WorkspaceConnectionInfo connectionInfo = new WorkspaceConnectionInfo();
connectionInfo.setServer(path);
connectionInfo.setType(WorkspaceType.SMWU );
mworkspace.open(connectionInfo);
Datasource da = mworkspace.getDatasources().get(0);
mmapControl = mapView.getMapControl();
mmapControl.getMap().setWorkspace(mworkspace);
map = mmapControl.getMap();
maps = mworkspace.getMaps();
layers = map.getLayers();