Merge branch 'master' of https://gitlab.navinfo.com/CollectVehicle/OneMapQS
Conflicts: collect-library/src/main/java/com/navinfo/collect/library/map/source/OMDBTileSource.java vtm
This commit is contained in:
@@ -154,6 +154,7 @@
|
|||||||
"code": 2201,
|
"code": 2201,
|
||||||
"name": "桥",
|
"name": "桥",
|
||||||
"catch":true,
|
"catch":true,
|
||||||
|
"existSubCode": true,
|
||||||
"zoomMin": 15,
|
"zoomMin": 15,
|
||||||
"zoomMax": 20,
|
"zoomMax": 20,
|
||||||
"transformer": [
|
"transformer": [
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ data class EvaluationInfo(
|
|||||||
@SerializedName("evaluationWay")
|
@SerializedName("evaluationWay")
|
||||||
val evaluationWay: Int = 2,//测评方式 1生产测评 2现场测评 服务字段定义为Integer,使用包装类,对应无值情况为空
|
val evaluationWay: Int = 2,//测评方式 1生产测评 2现场测评 服务字段定义为Integer,使用包装类,对应无值情况为空
|
||||||
|
|
||||||
@SerializedName("roadClassfcation")
|
@SerializedName("roadClassifcation")
|
||||||
val roadClassfcation: Int = 1,//道路种别
|
val roadClassifcation: Int = 1,//道路种别
|
||||||
|
|
||||||
@SerializedName("roadFunctionGrade")
|
@SerializedName("roadFunctionGrade")
|
||||||
val roadFunctionGrade: Int = 1,//道路功能等级
|
val roadFunctionGrade: Int = 1,//道路功能等级
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.navinfo.omqs.db
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.database.Cursor.*
|
import android.database.Cursor.*
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
|
import android.provider.ContactsContract.Data
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import androidx.annotation.RequiresApi
|
import androidx.annotation.RequiresApi
|
||||||
import com.blankj.utilcode.util.FileIOUtils
|
import com.blankj.utilcode.util.FileIOUtils
|
||||||
@@ -234,7 +235,7 @@ class ImportOMDBHelper @AssistedInject constructor(
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
elementIndex += 1
|
elementIndex += 1
|
||||||
dataIndex +=1
|
dataIndex += 1
|
||||||
Log.d("ImportOMDBHelper", "解析第:${index + 1}行")
|
Log.d("ImportOMDBHelper", "解析第:${index + 1}行")
|
||||||
val map = gson.fromJson<Map<String, Any>>(
|
val map = gson.fromJson<Map<String, Any>>(
|
||||||
line,
|
line,
|
||||||
@@ -313,12 +314,13 @@ class ImportOMDBHelper @AssistedInject constructor(
|
|||||||
Log.d("ImportOMDBHelper", "解析===2处理name")
|
Log.d("ImportOMDBHelper", "解析===2处理name")
|
||||||
Log.d("ImportOMDBHelper", "解析===1处理杆状物")
|
Log.d("ImportOMDBHelper", "解析===1处理杆状物")
|
||||||
|
|
||||||
if(currentConfig.filterData){
|
if (currentConfig.filterData) {
|
||||||
when (renderEntity.code.toInt()) {
|
when (renderEntity.code.toInt()) {
|
||||||
|
|
||||||
DataCodeEnum.OMDB_POLE.code.toInt() -> {
|
DataCodeEnum.OMDB_POLE.code.toInt() -> {
|
||||||
//过滤树类型的杆状物,无需导入到数据库中
|
//过滤树类型的杆状物,无需导入到数据库中
|
||||||
val poleType = renderEntity.properties["poleType"]
|
val poleType =
|
||||||
|
renderEntity.properties["poleType"]
|
||||||
if (poleType != null && poleType.toInt() == 2) {
|
if (poleType != null && poleType.toInt() == 2) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -345,7 +347,7 @@ class ImportOMDBHelper @AssistedInject constructor(
|
|||||||
renderEntity.properties["boundaryType"]
|
renderEntity.properties["boundaryType"]
|
||||||
if (boundaryType != null) {
|
if (boundaryType != null) {
|
||||||
when (boundaryType.toInt()) {
|
when (boundaryType.toInt()) {
|
||||||
0, 1,3,4, 5, 7, 9 -> {
|
0, 1, 3, 4, 5, 7, 9 -> {
|
||||||
renderEntity.enable = 0
|
renderEntity.enable = 0
|
||||||
Log.e(
|
Log.e(
|
||||||
"qj",
|
"qj",
|
||||||
@@ -379,8 +381,10 @@ class ImportOMDBHelper @AssistedInject constructor(
|
|||||||
"linkOut"
|
"linkOut"
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
var linkIn = renderEntity.properties["linkIn"]
|
var linkIn =
|
||||||
var linkOut = renderEntity.properties["linkOut"]
|
renderEntity.properties["linkIn"]
|
||||||
|
var linkOut =
|
||||||
|
renderEntity.properties["linkOut"]
|
||||||
if (linkIn != null && linkOut != null) {
|
if (linkIn != null && linkOut != null) {
|
||||||
var checkMsg = "$linkIn$linkOut"
|
var checkMsg = "$linkIn$linkOut"
|
||||||
if (resHashMap.containsKey(checkMsg)) {
|
if (resHashMap.containsKey(checkMsg)) {
|
||||||
@@ -527,7 +531,7 @@ class ImportOMDBHelper @AssistedInject constructor(
|
|||||||
Log.d("ImportOMDBHelper", "解析===1子code处理")
|
Log.d("ImportOMDBHelper", "解析===1子code处理")
|
||||||
//对code编码需要特殊处理 存在多个属性值时,渲染优先级:SA>PA,存在多个属性值时,渲染优先级:FRONTAGE>MAIN_SIDE_A CCESS
|
//对code编码需要特殊处理 存在多个属性值时,渲染优先级:SA>PA,存在多个属性值时,渲染优先级:FRONTAGE>MAIN_SIDE_A CCESS
|
||||||
|
|
||||||
if(currentConfig.existSubCode){
|
if (currentConfig.existSubCode) {
|
||||||
when (renderEntity.code.toInt()) {
|
when (renderEntity.code.toInt()) {
|
||||||
DataCodeEnum.OMDB_LINK_ATTRIBUTE.code.toInt() -> {
|
DataCodeEnum.OMDB_LINK_ATTRIBUTE.code.toInt() -> {
|
||||||
|
|
||||||
@@ -578,6 +582,17 @@ class ImportOMDBHelper @AssistedInject constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//桥
|
||||||
|
DataCodeEnum.OMDB_BRIDGE.code.toInt() -> {
|
||||||
|
when (renderEntity.properties["bridgeType"]) {
|
||||||
|
"1" -> renderEntity.code =
|
||||||
|
DataCodeEnum.OMDB_BRIDGE_1.code
|
||||||
|
"2" -> renderEntity.code =
|
||||||
|
DataCodeEnum.OMDB_BRIDGE_2.code
|
||||||
|
// "3" -> renderEntity.code = DataCodeEnum.OMDB_BRIDGE_3.code
|
||||||
|
else -> DataCodeEnum.OMDB_BRIDGE.code
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
DataCodeEnum.OMDB_RAMP.code.toInt() -> {
|
DataCodeEnum.OMDB_RAMP.code.toInt() -> {
|
||||||
/*匝道*/
|
/*匝道*/
|
||||||
@@ -692,7 +707,8 @@ class ImportOMDBHelper @AssistedInject constructor(
|
|||||||
|
|
||||||
if (renderEntity.table == DataCodeEnum.OMDB_NODE_FORM.name) {//特殊处理,因为code相同,使用表名判断
|
if (renderEntity.table == DataCodeEnum.OMDB_NODE_FORM.name) {//特殊处理,因为code相同,使用表名判断
|
||||||
//过滤不需要渲染的要素
|
//过滤不需要渲染的要素
|
||||||
var formOfWay = renderEntity.properties["formOfWay"]
|
var formOfWay =
|
||||||
|
renderEntity.properties["formOfWay"]
|
||||||
if (formOfWay != null && formOfWay.toInt() == 30) {
|
if (formOfWay != null && formOfWay.toInt() == 30) {
|
||||||
renderEntity.enable = 2
|
renderEntity.enable = 2
|
||||||
renderEntity.code =
|
renderEntity.code =
|
||||||
@@ -756,7 +772,7 @@ class ImportOMDBHelper @AssistedInject constructor(
|
|||||||
)
|
)
|
||||||
elementIndex = 0
|
elementIndex = 0
|
||||||
tableImportTime = System.currentTimeMillis()
|
tableImportTime = System.currentTimeMillis()
|
||||||
if(insertIndex%20000==0){
|
if (insertIndex % 20000 == 0) {
|
||||||
Log.d(
|
Log.d(
|
||||||
"ImportOMDBHelper",
|
"ImportOMDBHelper",
|
||||||
"表解析===结束用时时间===事物开始"
|
"表解析===结束用时时间===事物开始"
|
||||||
@@ -766,12 +782,16 @@ class ImportOMDBHelper @AssistedInject constructor(
|
|||||||
Log.d(
|
Log.d(
|
||||||
"ImportOMDBHelper",
|
"ImportOMDBHelper",
|
||||||
"表解析===结束用时时间===事物结束"
|
"表解析===结束用时时间===事物结束"
|
||||||
) }
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Realm.getInstance(currentInstallTaskConfig).commitTransaction()
|
Realm.getInstance(currentInstallTaskConfig).commitTransaction()
|
||||||
Realm.getInstance(currentInstallTaskConfig).close()
|
Realm.getInstance(currentInstallTaskConfig).close()
|
||||||
Log.d("ImportOMDBHelper", "表解析===结束用时时间${(System.currentTimeMillis() - dataImportTime)}===$dataIndex===插入$insertIndex")
|
Log.d(
|
||||||
|
"ImportOMDBHelper",
|
||||||
|
"表解析===结束用时时间${(System.currentTimeMillis() - dataImportTime)}===$dataIndex===插入$insertIndex"
|
||||||
|
)
|
||||||
Log.e("qj", "安装结束")
|
Log.e("qj", "安装结束")
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
if (Realm.getInstance(currentInstallTaskConfig).isInTransaction) {
|
if (Realm.getInstance(currentInstallTaskConfig).isInTransaction) {
|
||||||
|
|||||||
@@ -110,13 +110,14 @@ class TaskDownloadScope(
|
|||||||
downloadData.postValue(taskBean)
|
downloadData.postValue(taskBean)
|
||||||
if (status != FileDownloadStatus.LOADING && status != FileDownloadStatus.IMPORTING) {
|
if (status != FileDownloadStatus.LOADING && status != FileDownloadStatus.IMPORTING) {
|
||||||
val realm = realmOperateHelper.getRealmDefaultInstance()
|
val realm = realmOperateHelper.getRealmDefaultInstance()
|
||||||
Log.e("jingo", "数据下载更新状态 任务link数量:${taskBean.hadLinkDvoList.size}")
|
// Log.e("jingo", "数据下载更新状态 原${}")
|
||||||
realm.executeTransaction { r ->
|
realm.executeTransaction { r ->
|
||||||
// realm.insertOrUpdate(taskBean)
|
// realm.insertOrUpdate(taskBean)
|
||||||
val newTask =
|
val newTask =
|
||||||
realm.where(TaskBean::class.java).equalTo("id", taskBean.id).findFirst()
|
realm.where(TaskBean::class.java).equalTo("id", taskBean.id).findFirst()
|
||||||
newTask?.let {
|
newTask?.let {
|
||||||
it.syncStatus = taskBean.syncStatus
|
it.syncStatus = taskBean.syncStatus
|
||||||
|
it.status = taskBean.status
|
||||||
it.errMsg = taskBean.errMsg
|
it.errMsg = taskBean.errMsg
|
||||||
//赋值时间,用于查询过滤
|
//赋值时间,用于查询过滤
|
||||||
it.operationTime = taskBean.operationTime
|
it.operationTime = taskBean.operationTime
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ class TaskUploadScope(
|
|||||||
evaluatorName = "",
|
evaluatorName = "",
|
||||||
evaluationDate = "",
|
evaluationDate = "",
|
||||||
evaluationWay = 2,
|
evaluationWay = 2,
|
||||||
roadClassfcation = 1,
|
roadClassifcation = 1,
|
||||||
roadFunctionGrade = 0,
|
roadFunctionGrade = 0,
|
||||||
noEvaluationreason = hadLinkDvoBean.reason,
|
noEvaluationreason = hadLinkDvoBean.reason,
|
||||||
linkLength = 0.0,
|
linkLength = 0.0,
|
||||||
@@ -211,14 +211,14 @@ class TaskUploadScope(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var roadClassfcation = 0
|
var roadClassifcation = 0
|
||||||
|
|
||||||
var roadFunctionGrade = 0
|
var roadFunctionGrade = 0
|
||||||
|
|
||||||
var dataLevel = 0
|
var dataLevel = 0
|
||||||
|
|
||||||
if (hadLinkDvoBean.linkInfo != null) {
|
if (hadLinkDvoBean.linkInfo != null) {
|
||||||
roadClassfcation = hadLinkDvoBean.linkInfo!!.kind
|
roadClassifcation = hadLinkDvoBean.linkInfo!!.kind
|
||||||
roadFunctionGrade = hadLinkDvoBean.linkInfo!!.functionLevel
|
roadFunctionGrade = hadLinkDvoBean.linkInfo!!.functionLevel
|
||||||
dataLevel = hadLinkDvoBean.linkInfo!!.dataLevel
|
dataLevel = hadLinkDvoBean.linkInfo!!.dataLevel
|
||||||
}
|
}
|
||||||
@@ -243,7 +243,7 @@ class TaskUploadScope(
|
|||||||
evaluatorName = it.checkUserId,
|
evaluatorName = it.checkUserId,
|
||||||
evaluationDate = it.checkTime,
|
evaluationDate = it.checkTime,
|
||||||
evaluationWay = evaluationWay,
|
evaluationWay = evaluationWay,
|
||||||
roadClassfcation = roadClassfcation,
|
roadClassifcation = roadClassifcation,
|
||||||
roadFunctionGrade = roadFunctionGrade,
|
roadFunctionGrade = roadFunctionGrade,
|
||||||
noEvaluationreason = "",
|
noEvaluationreason = "",
|
||||||
linkLength = s.toDouble(),
|
linkLength = s.toDouble(),
|
||||||
|
|||||||
@@ -49,11 +49,9 @@ import dagger.hilt.android.lifecycle.HiltViewModel
|
|||||||
import io.realm.Realm
|
import io.realm.Realm
|
||||||
import io.realm.RealmConfiguration
|
import io.realm.RealmConfiguration
|
||||||
import io.realm.RealmSet
|
import io.realm.RealmSet
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.*
|
||||||
import kotlinx.coroutines.flow.collectLatest
|
import kotlinx.coroutines.flow.collectLatest
|
||||||
import kotlinx.coroutines.launch
|
|
||||||
import kotlinx.coroutines.sync.Mutex
|
import kotlinx.coroutines.sync.Mutex
|
||||||
import kotlinx.coroutines.withContext
|
|
||||||
import org.locationtech.jts.geom.Geometry
|
import org.locationtech.jts.geom.Geometry
|
||||||
import org.oscim.core.GeoPoint
|
import org.oscim.core.GeoPoint
|
||||||
import org.oscim.core.MapPosition
|
import org.oscim.core.MapPosition
|
||||||
@@ -234,6 +232,10 @@ class MainViewModel @Inject constructor(
|
|||||||
|
|
||||||
private var currentMapZoomLevel: Int = 0
|
private var currentMapZoomLevel: Int = 0
|
||||||
|
|
||||||
|
//导航轨迹回顾
|
||||||
|
private var naviLocationTest = false
|
||||||
|
private var naviLocationTestJob: Job? = null
|
||||||
|
|
||||||
//导航信息
|
//导航信息
|
||||||
private var naviEngine: NaviEngine? = null
|
private var naviEngine: NaviEngine? = null
|
||||||
|
|
||||||
@@ -487,10 +489,9 @@ class MainViewModel @Inject constructor(
|
|||||||
if (currentTaskBean != null) {
|
if (currentTaskBean != null) {
|
||||||
var list = mutableListOf<QsRecordBean>()
|
var list = mutableListOf<QsRecordBean>()
|
||||||
val realm = realmOperateHelper.getRealmDefaultInstance()
|
val realm = realmOperateHelper.getRealmDefaultInstance()
|
||||||
realm.executeTransaction {
|
val id = sharedPreferences.getInt(Constant.SELECT_TASK_ID, -1)
|
||||||
val objects = realmOperateHelper.getRealmTools(QsRecordBean::class.java).findAll()
|
val objects = realm.where(QsRecordBean::class.java).equalTo("taskId", id).findAll()
|
||||||
list = realm.copyFromRealm(objects)
|
list = realm.copyFromRealm(objects)
|
||||||
}
|
|
||||||
realm.close()
|
realm.close()
|
||||||
mapController.markerHandle.removeAllQsMarker()
|
mapController.markerHandle.removeAllQsMarker()
|
||||||
for (item in list) {
|
for (item in list) {
|
||||||
@@ -541,7 +542,11 @@ class MainViewModel @Inject constructor(
|
|||||||
mapController.locationLayerHandler.niLocationFlow.collect { location ->
|
mapController.locationLayerHandler.niLocationFlow.collect { location ->
|
||||||
|
|
||||||
//过滤掉无效点
|
//过滤掉无效点
|
||||||
if (!GeometryTools.isCheckError(location.longitude, location.latitude)) {
|
if (!naviLocationTest && !GeometryTools.isCheckError(
|
||||||
|
location.longitude,
|
||||||
|
location.latitude
|
||||||
|
)
|
||||||
|
) {
|
||||||
val geometry = GeometryTools.createGeometry(
|
val geometry = GeometryTools.createGeometry(
|
||||||
GeoPoint(
|
GeoPoint(
|
||||||
location.latitude, location.longitude
|
location.latitude, location.longitude
|
||||||
@@ -698,7 +703,16 @@ class MainViewModel @Inject constructor(
|
|||||||
DataCodeEnum.OMDB_LINK_SPEEDLIMIT.code, //线限速,
|
DataCodeEnum.OMDB_LINK_SPEEDLIMIT.code, //线限速,
|
||||||
DataCodeEnum.OMDB_LINK_DIRECT.code,//道路方向,
|
DataCodeEnum.OMDB_LINK_DIRECT.code,//道路方向,
|
||||||
DataCodeEnum.OMDB_RAMP.code, //匝道
|
DataCodeEnum.OMDB_RAMP.code, //匝道
|
||||||
|
DataCodeEnum.OMDB_RAMP_1.code,
|
||||||
|
DataCodeEnum.OMDB_RAMP_2.code,
|
||||||
|
DataCodeEnum.OMDB_RAMP_3.code,
|
||||||
|
DataCodeEnum.OMDB_RAMP_4.code,
|
||||||
|
DataCodeEnum.OMDB_RAMP_5.code,
|
||||||
|
DataCodeEnum.OMDB_RAMP_6.code,
|
||||||
|
DataCodeEnum.OMDB_RAMP_7.code,
|
||||||
DataCodeEnum.OMDB_BRIDGE.code,//桥
|
DataCodeEnum.OMDB_BRIDGE.code,//桥
|
||||||
|
DataCodeEnum.OMDB_BRIDGE_1.code,
|
||||||
|
DataCodeEnum.OMDB_BRIDGE_2.code,
|
||||||
DataCodeEnum.OMDB_TUNNEL.code,//隧道
|
DataCodeEnum.OMDB_TUNNEL.code,//隧道
|
||||||
DataCodeEnum.OMDB_ROUNDABOUT.code,//环岛
|
DataCodeEnum.OMDB_ROUNDABOUT.code,//环岛
|
||||||
DataCodeEnum.OMDB_LINK_ATTRIBUTE_MAIN_SIDE_ACCESS.code,//出入口
|
DataCodeEnum.OMDB_LINK_ATTRIBUTE_MAIN_SIDE_ACCESS.code,//出入口
|
||||||
@@ -842,7 +856,17 @@ class MainViewModel @Inject constructor(
|
|||||||
DataCodeEnum.OMDB_LINK_SPEEDLIMIT_COND.code,//条件线限速
|
DataCodeEnum.OMDB_LINK_SPEEDLIMIT_COND.code,//条件线限速
|
||||||
DataCodeEnum.OMDB_LINK_DIRECT.code,//道路方向,
|
DataCodeEnum.OMDB_LINK_DIRECT.code,//道路方向,
|
||||||
DataCodeEnum.OMDB_RAMP.code, //匝道
|
DataCodeEnum.OMDB_RAMP.code, //匝道
|
||||||
|
DataCodeEnum.OMDB_RAMP_1.code,
|
||||||
|
DataCodeEnum.OMDB_RAMP_2.code,
|
||||||
|
DataCodeEnum.OMDB_RAMP_3.code,
|
||||||
|
DataCodeEnum.OMDB_RAMP_4.code,
|
||||||
|
DataCodeEnum.OMDB_RAMP_5.code,
|
||||||
|
DataCodeEnum.OMDB_RAMP_6.code,
|
||||||
|
DataCodeEnum.OMDB_RAMP_7.code,
|
||||||
DataCodeEnum.OMDB_BRIDGE.code,//桥
|
DataCodeEnum.OMDB_BRIDGE.code,//桥
|
||||||
|
DataCodeEnum.OMDB_BRIDGE_1.code,//桥
|
||||||
|
DataCodeEnum.OMDB_BRIDGE_2.code,//桥
|
||||||
|
|
||||||
DataCodeEnum.OMDB_TUNNEL.code,//隧道
|
DataCodeEnum.OMDB_TUNNEL.code,//隧道
|
||||||
DataCodeEnum.OMDB_ROUNDABOUT.code,//环岛
|
DataCodeEnum.OMDB_ROUNDABOUT.code,//环岛
|
||||||
DataCodeEnum.OMDB_LINK_ATTRIBUTE_MAIN_SIDE_ACCESS.code,//出入口
|
DataCodeEnum.OMDB_LINK_ATTRIBUTE_MAIN_SIDE_ACCESS.code,//出入口
|
||||||
@@ -1610,5 +1634,62 @@ class MainViewModel @Inject constructor(
|
|||||||
fun clearMarker() {
|
fun clearMarker() {
|
||||||
mapController.markerHandle.removeMarker()
|
mapController.markerHandle.removeMarker()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导航测试
|
||||||
|
*/
|
||||||
|
fun setNaviLocationTestStartTime(time: Long) {
|
||||||
|
naviLocationTest = true
|
||||||
|
if (naviLocationTestJob != null && naviLocationTestJob!!.isActive)
|
||||||
|
naviLocationTestJob!!.cancel()
|
||||||
|
naviLocationTestJob = viewModelScope.launch(Dispatchers.IO) {
|
||||||
|
var b = true
|
||||||
|
val limitCount = 20
|
||||||
|
var lastTime: Long = time
|
||||||
|
while (b) {
|
||||||
|
Log.e("jingo", "下一组定位点起始时间 $lastTime")
|
||||||
|
val list = traceDataBase.niLocationDao.findListWithStartTime(lastTime, limitCount)
|
||||||
|
|
||||||
|
for (location in list) {
|
||||||
|
if (!naviLocationTest)
|
||||||
|
break
|
||||||
|
val nowTime = location.timeStamp.toLong()
|
||||||
|
if (lastTime != 0L) {
|
||||||
|
val tempTime = nowTime - lastTime
|
||||||
|
if (tempTime > 10000) {
|
||||||
|
liveDataMessage.postValue("下个定位点与当前定位点时间间隔超过10秒(${tempTime}),将直接跳转到下个点")
|
||||||
|
delay(5000)
|
||||||
|
} else {
|
||||||
|
delay(tempTime)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
lastTime = nowTime
|
||||||
|
|
||||||
|
withContext(Dispatchers.Main) {
|
||||||
|
mapController.animationHandler.animationByLatLon(
|
||||||
|
location.latitude,
|
||||||
|
location.longitude
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
mapController.locationLayerHandler.niLocationFlow.emit(location)
|
||||||
|
}
|
||||||
|
if (list.size < limitCount) {
|
||||||
|
b = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 停止测试
|
||||||
|
*/
|
||||||
|
fun stopNaviLocationTest() {
|
||||||
|
naviLocationTest = false
|
||||||
|
if (naviLocationTestJob != null) {
|
||||||
|
naviLocationTestJob!!.cancel()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,20 +2,28 @@ package com.navinfo.omqs.ui.dialog
|
|||||||
|
|
||||||
import android.app.Dialog
|
import android.app.Dialog
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.util.Log
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.DatePicker
|
import android.widget.DatePicker
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import android.widget.TimePicker
|
import android.widget.TimePicker
|
||||||
|
import androidx.annotation.RequiresApi
|
||||||
import com.navinfo.omqs.R
|
import com.navinfo.omqs.R
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
|
||||||
interface OnTimeDialogListener {
|
interface OnTimeDialogListener {
|
||||||
|
fun selectTime(milliseconds: Long)
|
||||||
}
|
}
|
||||||
|
|
||||||
class TimeDialog(context: Context) : Dialog(context), View.OnClickListener {
|
class TimeDialog(context: Context, val listener: OnTimeDialogListener) : Dialog(context),
|
||||||
|
View.OnClickListener {
|
||||||
|
|
||||||
private lateinit var dataPicker: DatePicker
|
private lateinit var dataPicker: DatePicker
|
||||||
private lateinit var timePicker: TimePicker
|
private lateinit var timePicker: TimePicker
|
||||||
|
|
||||||
|
|
||||||
private var timeText = ""
|
private var timeText = ""
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
val customFrame = View.inflate(context, R.layout.dialog_time_layout, null)
|
val customFrame = View.inflate(context, R.layout.dialog_time_layout, null)
|
||||||
@@ -26,10 +34,30 @@ class TimeDialog(context: Context) : Dialog(context), View.OnClickListener {
|
|||||||
setContentView(customFrame)
|
setContentView(customFrame)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequiresApi(Build.VERSION_CODES.M)
|
||||||
override fun onClick(v: View) {
|
override fun onClick(v: View) {
|
||||||
when (v.id) {
|
when (v.id) {
|
||||||
R.id.time_dialog_ok -> {
|
R.id.time_dialog_ok -> {
|
||||||
// dataPicker.
|
val month = if (dataPicker.month > 8) {
|
||||||
|
"${dataPicker.month + 1}"
|
||||||
|
} else {
|
||||||
|
"0${dataPicker.month + 1}"
|
||||||
|
}
|
||||||
|
val hour = if(timePicker.hour < 10){
|
||||||
|
"0${timePicker.hour}"
|
||||||
|
}else{
|
||||||
|
"${timePicker.hour}"
|
||||||
|
}
|
||||||
|
val minute = if(timePicker.minute<10){
|
||||||
|
"0${timePicker.minute}"
|
||||||
|
}else{
|
||||||
|
"${timePicker.minute}"
|
||||||
|
}
|
||||||
|
val time =
|
||||||
|
"${dataPicker.year}${month}${dataPicker.dayOfMonth}${hour}${minute}00"
|
||||||
|
Log.e("jingo", "选择的时间 $time")
|
||||||
|
val sdf = SimpleDateFormat("yyyyMMddHHmmss")
|
||||||
|
listener.selectTime(sdf.parse(time).time)
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
R.id.time_dialog_cancel -> {
|
R.id.time_dialog_cancel -> {
|
||||||
|
|||||||
@@ -181,6 +181,7 @@ class ConsoleFragment : BaseFragment(), OnClickListener {
|
|||||||
*/
|
*/
|
||||||
binding.consoleRoot.findViewById<View>(R.id.console_route_bg)?.setOnClickListener(this)
|
binding.consoleRoot.findViewById<View>(R.id.console_route_bg)?.setOnClickListener(this)
|
||||||
binding.consoleRoot.findViewById<View>(R.id.console_route_icon_bg)?.setOnClickListener(this)
|
binding.consoleRoot.findViewById<View>(R.id.console_route_icon_bg)?.setOnClickListener(this)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import com.navinfo.omqs.hilt.ImportOMDBHiltFactory
|
|||||||
import com.navinfo.omqs.tools.CoroutineUtils
|
import com.navinfo.omqs.tools.CoroutineUtils
|
||||||
import com.navinfo.omqs.ui.activity.map.MainViewModel
|
import com.navinfo.omqs.ui.activity.map.MainViewModel
|
||||||
import com.navinfo.omqs.ui.activity.scan.QrCodeActivity
|
import com.navinfo.omqs.ui.activity.scan.QrCodeActivity
|
||||||
|
import com.navinfo.omqs.ui.dialog.OnTimeDialogListener
|
||||||
import com.navinfo.omqs.ui.dialog.TimeDialog
|
import com.navinfo.omqs.ui.dialog.TimeDialog
|
||||||
import com.navinfo.omqs.ui.fragment.BaseFragment
|
import com.navinfo.omqs.ui.fragment.BaseFragment
|
||||||
import com.permissionx.guolindev.PermissionX
|
import com.permissionx.guolindev.PermissionX
|
||||||
@@ -181,7 +182,7 @@ class PersonalCenterFragment(private var indoorDataListener: ((Boolean) -> Unit?
|
|||||||
// 定位到指定位置
|
// 定位到指定位置
|
||||||
niMapController.mMapView.vtmMap.animator()
|
niMapController.mMapView.vtmMap.animator()
|
||||||
// .animateTo(GeoPoint( 40.05108004733645, 116.29187746293708 ))
|
// .animateTo(GeoPoint( 40.05108004733645, 116.29187746293708 ))
|
||||||
.animateTo(GeoPoint(40.07245537956604, 116.239638575623))
|
.animateTo(GeoPoint(40.0882756, 116.3033581))
|
||||||
}
|
}
|
||||||
|
|
||||||
R.id.personal_center_menu_open_all_layer -> {
|
R.id.personal_center_menu_open_all_layer -> {
|
||||||
@@ -206,8 +207,14 @@ class PersonalCenterFragment(private var indoorDataListener: ((Boolean) -> Unit?
|
|||||||
}
|
}
|
||||||
//导航定位测试
|
//导航定位测试
|
||||||
R.id.personal_center_menu_location_test -> {
|
R.id.personal_center_menu_location_test -> {
|
||||||
|
viewMainModel.stopNaviLocationTest()
|
||||||
val dialog = TimeDialog(
|
val dialog = TimeDialog(
|
||||||
requireContext(),
|
requireContext(),
|
||||||
|
object : OnTimeDialogListener {
|
||||||
|
override fun selectTime(milliseconds: Long) {
|
||||||
|
viewMainModel.setNaviLocationTestStartTime(milliseconds)
|
||||||
|
}
|
||||||
|
}
|
||||||
)
|
)
|
||||||
dialog.show()
|
dialog.show()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -227,7 +227,6 @@ class TaskListAdapter(
|
|||||||
binding.taskUploadBtn.isEnabled = false
|
binding.taskUploadBtn.isEnabled = false
|
||||||
binding.taskUploadBtn.setProgress(0)
|
binding.taskUploadBtn.setProgress(0)
|
||||||
binding.taskUploadBtn.setBackgroundColor(binding.root.resources.getColor(R.color.gray_121))
|
binding.taskUploadBtn.setBackgroundColor(binding.root.resources.getColor(R.color.gray_121))
|
||||||
Log.e("qj","${taskBean.id}===changeUploadTxtViews===已上传")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FileUploadStatus.ERROR -> {
|
FileUploadStatus.ERROR -> {
|
||||||
@@ -242,7 +241,6 @@ class TaskListAdapter(
|
|||||||
FileUploadStatus.NONE -> {
|
FileUploadStatus.NONE -> {
|
||||||
binding.taskUploadBtn.setText("未上传")
|
binding.taskUploadBtn.setText("未上传")
|
||||||
binding.taskUploadBtn.setProgress(0)
|
binding.taskUploadBtn.setProgress(0)
|
||||||
Log.e("qj","${taskBean.id}===changeUploadTxtViews===未上传")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FileUploadStatus.WAITING -> {
|
FileUploadStatus.WAITING -> {
|
||||||
|
|||||||
@@ -527,7 +527,7 @@ class NaviEngine(
|
|||||||
private suspend fun matchingItem() {
|
private suspend fun matchingItem() {
|
||||||
|
|
||||||
if (routeIndex > -1 && tempRoutList.isNotEmpty() && tempGeometry != null) {
|
if (routeIndex > -1 && tempRoutList.isNotEmpty() && tempGeometry != null) {
|
||||||
Log.e("jingo", "当前${routeIndex} ${tempRoutList[0].startIndexInPath} $footIndex")
|
// Log.e("jingo", "当前${routeIndex} ${tempRoutList[0].startIndexInPath} $footIndex")
|
||||||
//道路前方一定距离范围内的要素信息
|
//道路前方一定距离范围内的要素信息
|
||||||
val bindingItemList = mutableListOf<NaviRouteItem>()
|
val bindingItemList = mutableListOf<NaviRouteItem>()
|
||||||
//定位点到要素的路径距离
|
//定位点到要素的路径距离
|
||||||
|
|||||||
@@ -85,6 +85,13 @@ class SignUtil {
|
|||||||
if (data.properties["conAccess"] === "1") "全封闭" else ""
|
if (data.properties["conAccess"] === "1") "全封闭" else ""
|
||||||
}
|
}
|
||||||
//匝道
|
//匝道
|
||||||
|
DataCodeEnum.OMDB_RAMP_1.code,
|
||||||
|
DataCodeEnum.OMDB_RAMP_2.code,
|
||||||
|
DataCodeEnum.OMDB_RAMP_3.code,
|
||||||
|
DataCodeEnum.OMDB_RAMP_4.code,
|
||||||
|
DataCodeEnum.OMDB_RAMP_5.code,
|
||||||
|
DataCodeEnum.OMDB_RAMP_6.code,
|
||||||
|
DataCodeEnum.OMDB_RAMP_7.code,
|
||||||
DataCodeEnum.OMDB_RAMP.code -> {
|
DataCodeEnum.OMDB_RAMP.code -> {
|
||||||
when (data.properties["formOfWay"]) {
|
when (data.properties["formOfWay"]) {
|
||||||
"93" -> "普通匝"
|
"93" -> "普通匝"
|
||||||
@@ -110,6 +117,8 @@ class SignUtil {
|
|||||||
if (data.properties["multiDigitized"] == "1") "上下线" else " "
|
if (data.properties["multiDigitized"] == "1") "上下线" else " "
|
||||||
}
|
}
|
||||||
//桥
|
//桥
|
||||||
|
DataCodeEnum.OMDB_BRIDGE_1.code,//桥
|
||||||
|
DataCodeEnum.OMDB_BRIDGE_2.code,//桥
|
||||||
DataCodeEnum.OMDB_BRIDGE.code -> {
|
DataCodeEnum.OMDB_BRIDGE.code -> {
|
||||||
when (data.properties["bridgeType"]) {
|
when (data.properties["bridgeType"]) {
|
||||||
"1" -> return "固定桥"
|
"1" -> return "固定桥"
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/white"
|
android:background="@color/white"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
tools:context="com.navinfo.omqs.ui.dialog.TimeDialog">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -53,12 +54,13 @@
|
|||||||
android:padding="5dp"
|
android:padding="5dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:textColor="@color/red"
|
||||||
android:text="取消"
|
android:text="取消"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="1dp"
|
android:layout_width="1dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/gray"
|
android:background="@color/gray"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import androidx.room.Update;
|
|||||||
|
|
||||||
import com.navinfo.collect.library.data.entity.Element;
|
import com.navinfo.collect.library.data.entity.Element;
|
||||||
import com.navinfo.collect.library.data.entity.NiLocation;
|
import com.navinfo.collect.library.data.entity.NiLocation;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@@ -42,13 +43,16 @@ public interface INiLocationDao {
|
|||||||
List<NiLocation> findList(int minx, int maxx, int miny, int maxy);
|
List<NiLocation> findList(int minx, int maxx, int miny, int maxy);
|
||||||
|
|
||||||
@Query("SELECT * FROM niLocation where tilex>=:minx and tilex<=:maxx and tiley>=:miny and tiley <=:maxy and time>=:startTime and time<=:endTime")
|
@Query("SELECT * FROM niLocation where tilex>=:minx and tilex<=:maxx and tiley>=:miny and tiley <=:maxy and time>=:startTime and time<=:endTime")
|
||||||
List<NiLocation> timeTofindList(int minx, int maxx, int miny, int maxy,long startTime,long endTime);
|
List<NiLocation> timeTofindList(int minx, int maxx, int miny, int maxy, long startTime, long endTime);
|
||||||
|
|
||||||
@Query("SELECT * FROM niLocation")
|
@Query("SELECT * FROM niLocation")
|
||||||
List<NiLocation> findAll();
|
List<NiLocation> findAll();
|
||||||
|
|
||||||
@Query("SELECT * FROM niLocation where time>=:startTime and time<=:endTime and taskId=:taskId")
|
@Query("SELECT * FROM niLocation where time>=:startTime and time<=:endTime and taskId=:taskId")
|
||||||
List<NiLocation> taskIdAndTimeTofindList(String taskId,long startTime,long endTime);
|
List<NiLocation> taskIdAndTimeTofindList(String taskId, long startTime, long endTime);
|
||||||
|
|
||||||
|
@Query("SELECT * FROM niLocation where timeStamp>:startTime limit:limit ")
|
||||||
|
List<NiLocation> findListWithStartTime(long startTime, int limit);
|
||||||
|
|
||||||
@Query("SELECT * FROM niLocation where taskId =:taskId")
|
@Query("SELECT * FROM niLocation where taskId =:taskId")
|
||||||
List<NiLocation> findToTaskIdAll(String taskId);
|
List<NiLocation> findToTaskIdAll(String taskId);
|
||||||
|
|||||||
@@ -37,6 +37,9 @@ enum class DataCodeEnum(var tableName: String, var code: String) {
|
|||||||
OMDB_RDBOUND_BOUNDARYTYPE("道路边界类型", "2083"),
|
OMDB_RDBOUND_BOUNDARYTYPE("道路边界类型", "2083"),
|
||||||
OMDB_LANE_CONSTRUCTION("车道施工", "2090"),
|
OMDB_LANE_CONSTRUCTION("车道施工", "2090"),
|
||||||
OMDB_BRIDGE("桥", "2201"),
|
OMDB_BRIDGE("桥", "2201"),
|
||||||
|
OMDB_BRIDGE_1("固定桥", "2201-1"),
|
||||||
|
OMDB_BRIDGE_2("可移动桥", "2201-2"),
|
||||||
|
OMDB_BRIDGE_3("跨线天桥", "2201-2"),
|
||||||
OMDB_TUNNEL("隧道", "2202"),
|
OMDB_TUNNEL("隧道", "2202"),
|
||||||
OMDB_ROUNDABOUT("环岛", "2204"),
|
OMDB_ROUNDABOUT("环岛", "2204"),
|
||||||
OMDB_LINK_FORM1("道路形态1", "2205"),
|
OMDB_LINK_FORM1("道路形态1", "2205"),
|
||||||
|
|||||||
@@ -26,6 +26,11 @@ class LocationLayerHandler(context: AppCompatActivity, mapView: NIMapView) :
|
|||||||
private var bFirst = true
|
private var bFirst = true
|
||||||
private val mLocationLayer: LocationLayer = LocationLayer(mMapView.vtmMap)
|
private val mLocationLayer: LocationLayer = LocationLayer(mMapView.vtmMap)
|
||||||
private lateinit var locationClient: LocationClient
|
private lateinit var locationClient: LocationClient
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定位测试
|
||||||
|
*/
|
||||||
|
private var naviLocationTest = false
|
||||||
// private var niLocationListener: NiLocationListener by lazy{
|
// private var niLocationListener: NiLocationListener by lazy{
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
@@ -64,6 +69,10 @@ class LocationLayerHandler(context: AppCompatActivity, mapView: NIMapView) :
|
|||||||
//获取经纬度坐标类型,以LocationClientOption中设置过的坐标类型为准
|
//获取经纬度坐标类型,以LocationClientOption中设置过的坐标类型为准
|
||||||
// val coorType = it.coorType
|
// val coorType = it.coorType
|
||||||
//获取定位类型、定位错误返回码,具体信息可参照类参考中BDLocation类中的说明
|
//获取定位类型、定位错误返回码,具体信息可参照类参考中BDLocation类中的说明
|
||||||
|
//定位测试开始,后续不再处理
|
||||||
|
if (naviLocationTest)
|
||||||
|
return@MyLocationListener
|
||||||
|
|
||||||
val errorCode = it.locType
|
val errorCode = it.locType
|
||||||
mCurrentLocation = it
|
mCurrentLocation = it
|
||||||
mLocationLayer.setPosition(it.latitude, it.longitude, it.radius)
|
mLocationLayer.setPosition(it.latitude, it.longitude, it.radius)
|
||||||
@@ -215,7 +224,7 @@ private class MyLocationListener(callback: (BDLocation) -> Unit) : BDAbstractLoc
|
|||||||
val call = callback;
|
val call = callback;
|
||||||
override fun onReceiveLocation(location: BDLocation) {
|
override fun onReceiveLocation(location: BDLocation) {
|
||||||
call(location)
|
call(location)
|
||||||
Log.e("jingo", "定位结果:速度=" + location.speed +" 方向=" + location.direction)
|
Log.e("jingo", "定位结果:速度=" + location.speed + " 方向=" + location.direction)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
package com.navinfo.collect.library.map.source;
|
package com.navinfo.collect.library.map.source;
|
||||||
|
|
||||||
import com.navinfo.collect.library.system.Constant;
|
|
||||||
|
|
||||||
import org.oscim.map.Viewport;
|
import org.oscim.map.Viewport;
|
||||||
import org.oscim.tiling.ITileDataSource;
|
import org.oscim.tiling.ITileDataSource;
|
||||||
import org.oscim.tiling.OverzoomTileDataSource;
|
|
||||||
|
|
||||||
public class OMDBReferenceTileSource extends RealmDBTileSource {
|
public class OMDBReferenceTileSource extends RealmDBTileSource {
|
||||||
private OMDBReferenceDataSource omdbReferenceTileSource;
|
private OMDBReferenceDataSource omdbReferenceTileSource;
|
||||||
@@ -18,7 +15,8 @@ public class OMDBReferenceTileSource extends RealmDBTileSource {
|
|||||||
@Override
|
@Override
|
||||||
public ITileDataSource getDataSource() {
|
public ITileDataSource getDataSource() {
|
||||||
//return new OverzoomTileDataSource(new OMDBReferenceDataSource(), Constant.OVER_ZOOM);
|
//return new OverzoomTileDataSource(new OMDBReferenceDataSource(), Constant.OVER_ZOOM);
|
||||||
return new OverzoomTileDataSource(omdbReferenceTileSource, Constant.OVER_ZOOM);
|
// return new OverzoomTileDataSource(omdbReferenceTileSource, Constant.OVER_ZOOM);
|
||||||
|
return omdbReferenceTileSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -81,8 +81,8 @@ public class OMDBTileDataSource implements ITileDataSource {
|
|||||||
// 数据记录的tile号是以正外接tile号列表,此处过滤并未与当前tile相交的数据
|
// 数据记录的tile号是以正外接tile号列表,此处过滤并未与当前tile相交的数据
|
||||||
if (!listResult.isEmpty()) {
|
if (!listResult.isEmpty()) {
|
||||||
Polygon tilePolygon = GeometryTools.getTilePolygon(tile);
|
Polygon tilePolygon = GeometryTools.getTilePolygon(tile);
|
||||||
System.out.println("第一条数据的最小x值:" + listResult.get(0).getTileX().stream().min(Integer::compare).get());
|
// System.out.println("第一条数据的最小x值:" + listResult.get(0).getTileX().stream().min(Integer::compare).get());
|
||||||
System.out.println("当前tile的:" + listResult.get(0).getTileX().stream().min(Integer::compare).get());
|
// System.out.println("当前tile的:" + listResult.get(0).getTileX().stream().min(Integer::compare).get());
|
||||||
listResult = listResult.stream().filter((RenderEntity renderEntity) -> renderEntity.getWkt().intersects(tilePolygon))
|
listResult = listResult.stream().filter((RenderEntity renderEntity) -> renderEntity.getWkt().intersects(tilePolygon))
|
||||||
/*过滤数据,只有最小x(屏幕的最小x或数据的最小x会被渲染,跨Tile的其他数据不再重复渲染)*/
|
/*过滤数据,只有最小x(屏幕的最小x或数据的最小x会被渲染,跨Tile的其他数据不再重复渲染)*/
|
||||||
// .filter((RenderEntity renderEntity) -> MercatorProjection.longitudeToTileX(viewport.fromScreenPoint(0,0).getLongitude(), (byte) Constant.DATA_ZOOM) == currentTileX || renderEntity.getTileX().stream().min(Integer::compare).get() == currentTileX)
|
// .filter((RenderEntity renderEntity) -> MercatorProjection.longitudeToTileX(viewport.fromScreenPoint(0,0).getLongitude(), (byte) Constant.DATA_ZOOM) == currentTileX || renderEntity.getTileX().stream().min(Integer::compare).get() == currentTileX)
|
||||||
|
|||||||
@@ -3,11 +3,9 @@ package com.navinfo.collect.library.map.source;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.navinfo.collect.library.data.entity.RenderEntity;
|
import com.navinfo.collect.library.data.entity.RenderEntity;
|
||||||
import com.navinfo.collect.library.system.Constant;
|
|
||||||
|
|
||||||
import org.oscim.map.Viewport;
|
import org.oscim.map.Viewport;
|
||||||
import org.oscim.tiling.ITileDataSource;
|
import org.oscim.tiling.ITileDataSource;
|
||||||
import org.oscim.tiling.OverzoomTileDataSource;
|
|
||||||
|
|
||||||
import io.realm.Realm;
|
import io.realm.Realm;
|
||||||
|
|
||||||
@@ -23,7 +21,8 @@ public class OMDBTileSource extends RealmDBTileSource {
|
|||||||
@Override
|
@Override
|
||||||
public ITileDataSource getDataSource() {
|
public ITileDataSource getDataSource() {
|
||||||
// return new OverzoomTileDataSource(new OMDBTileDataSource(), Constant.OVER_ZOOM);
|
// return new OverzoomTileDataSource(new OMDBTileDataSource(), Constant.OVER_ZOOM);
|
||||||
return omdbTileDataSource;
|
// return new OverzoomTileDataSource(omdbTileDataSource, Constant.OVER_ZOOM);
|
||||||
|
return omdbTileDataSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user