DatasourceConnectionInfo myinfo1 = new DatasourceConnectionInfo(); myinfo1.setServer("http://192.168.0.205:8090/iserver/services/map-MHYXDT/wmts100"); myinfo1.setEngineType(EngineType.OGC); myinfo1.setDriver("WMTS"); myinfo1.setAlias("labe_chai"); DatasourceConnectionInfo myinfo2 = new DatasourceConnectionInfo(); myinfo2.setServer("http://192.168.0.205:8090/iserver/services/map-HQQ-3/wmts100"); myinfo2.setEngineType(EngineType.OGC); myinfo2.setDriver("WMTS"); myinfo2.setAlias("yx_mh"); if (myinfo2 != null) { //这是2 Datasource md = workspace.getDatasources().open(myinfo2); com.supermap.data.Dataset mdataset = md.getDatasets().get(0); mapControl.getMap().getLayers().add(mdataset, true); } if (myinfo1 != null) { //这是1 Datasource md = workspace.getDatasources().open(myinfo1); com.supermap.data.Dataset mdataset = md.getDatasets().get(0); mapControl.getMap().getLayers().add(mdataset, true); } mapControl.getMap().viewEntire(); mapControl.getMap().refresh(); 如上代码,两个链接,怎么只看到了一个地图(ps:分别屏蔽“这是1”和“这是2”的代码块,显示地图是正常显示的)