各位大佬,我有一张tiff格式的地图,如下图,将其切webp格式的缓存文件后加载到移动端,全图模式不显示,需手动缩放才显示。j
加载sci的代码如下,另外datasourceConnectionInfo.engineType = EngineType.Rest地图不显示:
datasourceConnectionInfo = DatasourceConnectionInfo()
// val url = "$rootPath${resources.getString(R.string.mapSciUrl)}"
// info.server = "$rootPath/SuperMap/SampleData/Day@World/Day@World.sci3d"
datasourceConnectionInfo.server = url
datasourceConnectionInfo.engineType = EngineType.IMAGEPLUGINS
// datasourceConnectionInfo.alias = "sicConnectionInfo"
val datasources: Datasources = mWorkspace!!.datasources
val ds = datasources.open(datasourceConnectionInfo)
if (ds != null) {
var layer = mMap!!.layers.add(ds.datasets.get(0), true)
layer.isVisible=true
//全幅显示
// mMap!!.viewEntire();
// loadingDialogViewBase.closeLoadingdialog()
} else {
loadingDialogViewBase.closeLoadingdialog()
}
datasourceConnectionInfo.dispose()