你好,使用SuperMap iMobile 10i(2020) SP1 for Android(64位) V10.1.1版本进行离线底图切换会进行资源释放,应该如何处理?
以下是示例代码:
var mInfo: WorkspaceConnectionInfo ?=null
// 示范数据/sdcard/SampleData/GeometryInfo/World.smwu
val filePath: String = path + fileName
val file = File(filePath)
if(!file.exists()) return mInfo
mInfo = WorkspaceConnectionInfo()
mInfo.server = filePath
if(fileName.endsWith(".SMWU")||fileName.endsWith(".smwu")){
mInfo.type = WorkspaceType.SMWU
}else if(fileName.endsWith(".SXWU")||fileName.endsWith(".sxwu")){
mInfo.type = WorkspaceType.SXWU
}
val isOpen = mWorkspace!!.open(mInfo)
mInfo.dispose()
mInfo = null
mMapControl = superMapView.mapControl
mMapControl!!.map.workspace = mWorkspace
mMapControl!!.map.mapDPI = mapDPI()
if(mWorkspace!!.maps.indexOf(topicName)!=-1){
val isOpenMap = mMapControl!!.map.open(topicName)
if (isOpenMap) {
refreshMap()
}
}
以上代码正常加载底图后,如果我用同样的方法加载另外一份底图,发现空间资源会被释放,并且叠加在他上面的专题也会被释放,我要怎么做才能做到底图切换后,叠加的专题图层不发生改变呢?