[Feat]新增高精地图缓存功能

This commit is contained in:
chenfufeng
2023-02-10 19:32:22 +08:00
parent f063088954
commit fc7732e8f5
22 changed files with 565 additions and 6 deletions

View File

@@ -0,0 +1,27 @@
package com.mogo.map.utils
object HDMapUtils {
private val cityCodeMap by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
val map = HashMap<String, Int>()
map["0831"] = 5115// 宜宾市
map["0512"] = 3205// 苏州市
map["0872"] = 5329// 大理市
map["0711"] = 4207// 鄂州市
map["028"] = 5101// 成都市
map["0931"] = 6201// 兰州市
map["0535"] = 3706// 烟台市
map["027"] = 4201// 武汉市
map["010"] = 1101// 北京市
map["0734"] = 4304// 衡阳市
map
}
/**
* gdCityCode: 高德CityCode
* return: 高精地图CityCode
*/
@JvmStatic
fun getHDCityCode(gdCityCode: String?): Int? {
return cityCodeMap[gdCityCode]
}
}