如果您是要将地图服务添加到二维里,就以先打开web数据源,再打开数据集的方式在地图打开,打开web数据源的主要示例代码如下,您可以参考。
DatasourceConnectionInfo datasourceConnectInfo = new DatasourceConnectionInfo();
datasourceConnectInfo.EngineType = EngineType.OGC; datasourceConnectInfo.Server = "http://localhost:8090/iserver/services/map-china400/wmts100"; datasourceConnectInfo.Driver = "WMTS" datasourceConnectInfo.Database = "D:/Cache"; datasourceConnectInfo.Alias = "WMTS";
workspace.Datasources.Open(datasourceConnectInfo);