fix: 修改图层管理
This commit is contained in:
parent
8a75aad54c
commit
464ca815c4
@ -83,7 +83,6 @@ class Constant {
|
|||||||
|
|
||||||
const val OMDB_CONFIG = "omdb.config"
|
const val OMDB_CONFIG = "omdb.config"
|
||||||
const val OTHER_CONFIG = "other.config"
|
const val OTHER_CONFIG = "other.config"
|
||||||
const val LAYER_MANAGER_CONFIG = "LAYER_MANAGER_CONFIG" // 图层管理界面缓存的key
|
|
||||||
|
|
||||||
val OMDB_LAYER_VISIBLE_LIST: MutableList<String> = mutableListOf() // 记录OMDB数据显示的图层名称列表
|
val OMDB_LAYER_VISIBLE_LIST: MutableList<String> = mutableListOf() // 记录OMDB数据显示的图层名称列表
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ class LayerConfigUtils {
|
|||||||
|
|
||||||
fun getLayerConfigList(): List<ImportConfig> {
|
fun getLayerConfigList(): List<ImportConfig> {
|
||||||
// 首先读取Shared文件,如果存在则直接返回,否则读取config文件
|
// 首先读取Shared文件,如果存在则直接返回,否则读取config文件
|
||||||
return SPStaticUtils.getString(Constant.LAYER_MANAGER_CONFIG, null).let {
|
return SPStaticUtils.getString(Constant.EVENT_LAYER_MANAGER_CHANGE, null).let {
|
||||||
if (this!=null) {
|
if (this!=null) {
|
||||||
val result: List<ImportConfig> = gson.fromJson(it, object : TypeToken<List<ImportConfig>>(){}.type)
|
val result: List<ImportConfig> = gson.fromJson(it, object : TypeToken<List<ImportConfig>>(){}.type)
|
||||||
result
|
result
|
||||||
@ -26,7 +26,7 @@ class LayerConfigUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getLayerConfigListFromAssetsFile(): List<ImportConfig> {
|
private fun getLayerConfigListFromAssetsFile(): List<ImportConfig> {
|
||||||
val resultList = mutableListOf<ImportConfig>()
|
val resultList = mutableListOf<ImportConfig>()
|
||||||
if (omdbConfigFile.exists()) {
|
if (omdbConfigFile.exists()) {
|
||||||
val omdbConfiStr = FileIOUtils.readFile2String(omdbConfigFile)
|
val omdbConfiStr = FileIOUtils.readFile2String(omdbConfigFile)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user