使用产品:iobjects.net 10 操作系统:win10 x64
问题描述:栅格瓦片发布的iServerRest服务,map中无法显示,也不报错,服务在iDesktop中能打开。我的主要代码如下:
DatasourceConnectionInfo sc = new DatasourceConnectionInfo();
sc.Server = iServerRestUri;
sc.EngineType = EngineType.iServerRest;
Datasource datasource = workspace.Datasources.Open(sc);
DatasetImage dataset = datasource.Datasets[0] as DatasetImage;
mapControl.Map.Layers.Add(dataset, true);
dataset是有数据的,map或layer是不是需要设置什么参数?
补充说明:如果iServer不用瓦片这段代码就能正常显示,如果发布成WMTS服务,通过以下代码也能显示:
DatasourceConnectionInfo sc = new DatasourceConnectionInfo();
sc.Server = iServerWMTSUri;
sc.EngineType = EngineType.OGC;
sc.Driver = "WMTS";
Datasource datasource = workspace.Datasources.Open(sc);
DatasetImage dataset = datasource.Datasets[0] as DatasetImage;
mapControl.Map.Layers.Add(dataset, true);