增加轨迹日志信息
@ -125,11 +125,6 @@
|
|||||||
"zoomMin": 15,
|
"zoomMin": 15,
|
||||||
"zoomMax": 17
|
"zoomMax": 17
|
||||||
},
|
},
|
||||||
"2041":{
|
|
||||||
"table": "OMDB_LANE_NUM",
|
|
||||||
"code": 2041,
|
|
||||||
"name": "车道数"
|
|
||||||
},
|
|
||||||
"2097":{
|
"2097":{
|
||||||
"table": "OMDB_PHY_LANENUM",
|
"table": "OMDB_PHY_LANENUM",
|
||||||
"code": 2097,
|
"code": 2097,
|
||||||
@ -533,12 +528,6 @@
|
|||||||
"zoomMin": 15,
|
"zoomMin": 15,
|
||||||
"zoomMax": 17,
|
"zoomMax": 17,
|
||||||
"transformer": [
|
"transformer": [
|
||||||
{
|
|
||||||
"k": "geometry",
|
|
||||||
"v": "~",
|
|
||||||
"klib": "geometry",
|
|
||||||
"vlib": "translateRight(direct=3)"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"k": "geometry",
|
"k": "geometry",
|
||||||
"v": "~",
|
"v": "~",
|
||||||
@ -643,4 +632,4 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -79,6 +79,11 @@ class Constant {
|
|||||||
*/
|
*/
|
||||||
lateinit var DOWNLOAD_PATH: String
|
lateinit var DOWNLOAD_PATH: String
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日志目录
|
||||||
|
*/
|
||||||
|
lateinit var USER_DATA_LOG_PATH: String
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 图层管理对应的配置
|
* 图层管理对应的配置
|
||||||
* */
|
* */
|
||||||
@ -107,6 +112,11 @@ class Constant {
|
|||||||
*/
|
*/
|
||||||
var MapMarkerCloseEnable = false
|
var MapMarkerCloseEnable = false
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 轨迹显隐
|
||||||
|
*/
|
||||||
|
var MapTraceCloseEnable = false
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否开启线捕捉
|
* 是否开启线捕捉
|
||||||
*/
|
*/
|
||||||
|
@ -8,6 +8,7 @@ import android.view.Surface
|
|||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import com.navinfo.omqs.tools.FileManager
|
import com.navinfo.omqs.tools.FileManager
|
||||||
import com.navinfo.omqs.ui.manager.TakePhotoManager
|
import com.navinfo.omqs.ui.manager.TakePhotoManager
|
||||||
|
import com.navinfo.omqs.util.CMLog
|
||||||
import com.navinfo.omqs.util.NetUtils
|
import com.navinfo.omqs.util.NetUtils
|
||||||
import com.umeng.commonsdk.UMConfigure
|
import com.umeng.commonsdk.UMConfigure
|
||||||
import dagger.hilt.android.HiltAndroidApp
|
import dagger.hilt.android.HiltAndroidApp
|
||||||
@ -20,6 +21,7 @@ class OMQSApplication : Application() {
|
|||||||
super.onCreate()
|
super.onCreate()
|
||||||
FileManager.initRootDir(this)
|
FileManager.initRootDir(this)
|
||||||
Util.getInstance().init(applicationContext)
|
Util.getInstance().init(applicationContext)
|
||||||
|
CMLog.getInstance().init(applicationContext)
|
||||||
NetUtils.getInstance().init(this)
|
NetUtils.getInstance().init(this)
|
||||||
TakePhotoManager.getInstance().init(this, 1)
|
TakePhotoManager.getInstance().init(this, 1)
|
||||||
// 初始化友盟统计
|
// 初始化友盟统计
|
||||||
|
@ -327,6 +327,10 @@ class ImportOMDBHelper @AssistedInject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
DataCodeEnum.OMDB_LANE_MARK_BOUNDARYTYPE.code.toInt() -> {
|
DataCodeEnum.OMDB_LANE_MARK_BOUNDARYTYPE.code.toInt() -> {
|
||||||
|
var featurePid = renderEntity.properties["featurePid"]
|
||||||
|
if(featurePid!="135340259623248665"){
|
||||||
|
continue
|
||||||
|
}
|
||||||
var boundaryType = renderEntity.properties["boundaryType"]
|
var boundaryType = renderEntity.properties["boundaryType"]
|
||||||
if (boundaryType != null) {
|
if (boundaryType != null) {
|
||||||
when (boundaryType.toInt()) {
|
when (boundaryType.toInt()) {
|
||||||
|
@ -485,10 +485,12 @@ class ImportPreProcess {
|
|||||||
renderEntityTemp.catchEnable = renderEntity.catchEnable
|
renderEntityTemp.catchEnable = renderEntity.catchEnable
|
||||||
var dis = -lateralOffset.toDouble() / 100000000
|
var dis = -lateralOffset.toDouble() / 100000000
|
||||||
//最小值取10厘米,否正渲染太近无法显示
|
//最小值取10厘米,否正渲染太近无法显示
|
||||||
if (dis > 0 && dis < 0.0000028) {
|
if (dis > 0 && dis < 0.000005) {
|
||||||
dis = 0.0000028
|
dis = 0.000005
|
||||||
} else if (dis > -0.0000028 && dis < 0) {
|
Log.d("lateralOffset", "$dis")
|
||||||
dis = -0.0000028
|
} else if (dis > -0.000005 && dis < 0) {
|
||||||
|
dis = -0.000005
|
||||||
|
Log.d("lateralOffset", "$dis")
|
||||||
}
|
}
|
||||||
renderEntityTemp.geometry = GeometryTools.computeLine(
|
renderEntityTemp.geometry = GeometryTools.computeLine(
|
||||||
dis,
|
dis,
|
||||||
|
@ -418,12 +418,15 @@ class LoginViewModel @Inject constructor(
|
|||||||
Constant.VERSION_ID = userId
|
Constant.VERSION_ID = userId
|
||||||
Constant.USER_DATA_PATH = Constant.DATA_PATH + Constant.USER_ID + "/" + Constant.VERSION_ID
|
Constant.USER_DATA_PATH = Constant.DATA_PATH + Constant.USER_ID + "/" + Constant.VERSION_ID
|
||||||
Constant.USER_DATA_ATTACHEMNT_PATH = Constant.USER_DATA_PATH + "/attachment/"
|
Constant.USER_DATA_ATTACHEMNT_PATH = Constant.USER_DATA_PATH + "/attachment/"
|
||||||
|
Constant.USER_DATA_LOG_PATH = Constant.USER_DATA_PATH + "/log/"
|
||||||
// 在SD卡创建用户目录,解压资源等
|
// 在SD卡创建用户目录,解压资源等
|
||||||
val userFolder = File(Constant.USER_DATA_PATH)
|
val userFolder = File(Constant.USER_DATA_PATH)
|
||||||
if (!userFolder.exists()) userFolder.mkdirs()
|
if (!userFolder.exists()) userFolder.mkdirs()
|
||||||
//创建附件目录
|
//创建附件目录
|
||||||
val userAttachmentFolder = File(Constant.USER_DATA_ATTACHEMNT_PATH)
|
val userAttachmentFolder = File(Constant.USER_DATA_ATTACHEMNT_PATH)
|
||||||
if (!userAttachmentFolder.exists()) userAttachmentFolder.mkdirs()
|
if (!userAttachmentFolder.exists()) userAttachmentFolder.mkdirs()
|
||||||
|
val userLogFolder = File(Constant.USER_DATA_LOG_PATH)
|
||||||
|
if (!userLogFolder.exists()) userLogFolder.mkdirs()
|
||||||
// 初始化Realm
|
// 初始化Realm
|
||||||
Realm.init(context.applicationContext)
|
Realm.init(context.applicationContext)
|
||||||
// 656e6372797000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
// 656e6372797000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
@ -23,6 +23,7 @@ import androidx.lifecycle.ViewModel
|
|||||||
import androidx.lifecycle.viewModelScope
|
import androidx.lifecycle.viewModelScope
|
||||||
import androidx.navigation.findNavController
|
import androidx.navigation.findNavController
|
||||||
import com.blankj.utilcode.util.ToastUtils
|
import com.blankj.utilcode.util.ToastUtils
|
||||||
|
import com.google.gson.Gson
|
||||||
import com.navinfo.collect.library.data.dao.impl.TraceDataBase
|
import com.navinfo.collect.library.data.dao.impl.TraceDataBase
|
||||||
import com.navinfo.collect.library.data.entity.*
|
import com.navinfo.collect.library.data.entity.*
|
||||||
import com.navinfo.collect.library.enums.DataCodeEnum
|
import com.navinfo.collect.library.enums.DataCodeEnum
|
||||||
@ -535,6 +536,7 @@ class MainViewModel @Inject constructor(
|
|||||||
* 初始化定位信息
|
* 初始化定位信息
|
||||||
*/
|
*/
|
||||||
private fun initLocation() {
|
private fun initLocation() {
|
||||||
|
var gson = Gson();
|
||||||
|
|
||||||
//用于定位点存储到数据库
|
//用于定位点存储到数据库
|
||||||
viewModelScope.launch(Dispatchers.Default) {
|
viewModelScope.launch(Dispatchers.Default) {
|
||||||
@ -590,10 +592,14 @@ class MainViewModel @Inject constructor(
|
|||||||
}
|
}
|
||||||
//室内整理工具时不能进行轨迹存储,判断轨迹间隔要超过2.5并小于60米
|
//室内整理工具时不能进行轨迹存储,判断轨迹间隔要超过2.5并小于60米
|
||||||
if (Constant.INDOOR_IP.isEmpty() && (disance == 0.0 || (disance > 2.5 && disance < 60))) {
|
if (Constant.INDOOR_IP.isEmpty() && (disance == 0.0 || (disance > 2.5 && disance < 60))) {
|
||||||
|
Log.e("jingo", "轨迹插入开始")
|
||||||
|
CMLog.writeLogtoFile(MainViewModel::class.java.name,"insertTrace","开始")
|
||||||
traceDataBase.niLocationDao.insert(location)
|
traceDataBase.niLocationDao.insert(location)
|
||||||
mapController.markerHandle.addNiLocationMarkerItem(location)
|
mapController.markerHandle.addNiLocationMarkerItem(location)
|
||||||
mapController.mMapView.vtmMap.updateMap(true)
|
mapController.mMapView.vtmMap.updateMap(true)
|
||||||
lastNiLocaion = location
|
lastNiLocaion = location
|
||||||
|
CMLog.writeLogtoFile(MainViewModel::class.java.name,"insertTrace",gson.toJson(location))
|
||||||
|
Log.e("jingo", "轨迹插入结束")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -980,7 +986,7 @@ class MainViewModel @Inject constructor(
|
|||||||
fun onClickLocationButton() {
|
fun onClickLocationButton() {
|
||||||
val mapPosition: MapPosition = mapController.mMapView.vtmMap.getMapPosition()
|
val mapPosition: MapPosition = mapController.mMapView.vtmMap.getMapPosition()
|
||||||
mapPosition.setBearing(0f) // 锁定角度,自动将地图旋转到正北方向
|
mapPosition.setBearing(0f) // 锁定角度,自动将地图旋转到正北方向
|
||||||
mapController.mMapView.vtmMap.setMapPosition(mapPosition)
|
mapController.mMapView.vtmMap.mapPosition = mapPosition
|
||||||
mapController.locationLayerHandler.animateToCurrentPosition()
|
mapController.locationLayerHandler.animateToCurrentPosition()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,6 +37,8 @@ class SignAdapter(private var listener: OnSignAdapterClickListener?) :
|
|||||||
override fun getItemViewType(position: Int): Int {
|
override fun getItemViewType(position: Int): Int {
|
||||||
if (data.isNotEmpty() && data[position].renderEntity.code == DataCodeEnum.OMDB_LANEINFO.code) {
|
if (data.isNotEmpty() && data[position].renderEntity.code == DataCodeEnum.OMDB_LANEINFO.code) {
|
||||||
return 4601
|
return 4601
|
||||||
|
}else if (data.isNotEmpty() && data[position].renderEntity.code == DataCodeEnum.OMDB_CLM_LANEINFO.code) {
|
||||||
|
return 4602
|
||||||
} else if (data.isNotEmpty() && data[position].renderEntity.code == DataCodeEnum.OMDB_TOLLGATE.code) {
|
} else if (data.isNotEmpty() && data[position].renderEntity.code == DataCodeEnum.OMDB_TOLLGATE.code) {
|
||||||
return 4023
|
return 4023
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@ class PersonalCenterFragment(private var indoorDataListener: ((Boolean) -> Unit?
|
|||||||
val mapPosition: MapPosition =
|
val mapPosition: MapPosition =
|
||||||
niMapController.mMapView.vtmMap.getMapPosition()
|
niMapController.mMapView.vtmMap.getMapPosition()
|
||||||
mapPosition.setBearing(0f) // 锁定角度,自动将地图旋转到正北方向
|
mapPosition.setBearing(0f) // 锁定角度,自动将地图旋转到正北方向
|
||||||
niMapController.mMapView.vtmMap.setMapPosition(mapPosition)
|
niMapController.mMapView.vtmMap.mapPosition = mapPosition
|
||||||
it.title = "开启地图旋转及视角"
|
it.title = "开启地图旋转及视角"
|
||||||
} else {
|
} else {
|
||||||
it.title = "锁定地图旋转及视角"
|
it.title = "锁定地图旋转及视角"
|
||||||
@ -168,6 +168,17 @@ class PersonalCenterFragment(private var indoorDataListener: ((Boolean) -> Unit?
|
|||||||
it.title = "隐藏Marker"
|
it.title = "隐藏Marker"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
R.id.personal_center_menu_trace -> {
|
||||||
|
Constant.MapTraceCloseEnable = !Constant.MapTraceCloseEnable
|
||||||
|
//增加开关控制
|
||||||
|
niMapController.markerHandle.setTraceMarkEnable(!Constant.MapTraceCloseEnable)
|
||||||
|
//增加开关控制
|
||||||
|
if (Constant.MapTraceCloseEnable) {
|
||||||
|
it.title = "显示轨迹"
|
||||||
|
} else {
|
||||||
|
it.title = "隐藏轨迹"
|
||||||
|
}
|
||||||
|
}
|
||||||
R.id.personal_center_menu_catch_all -> {
|
R.id.personal_center_menu_catch_all -> {
|
||||||
Constant.CATCH_ALL = !Constant.CATCH_ALL
|
Constant.CATCH_ALL = !Constant.CATCH_ALL
|
||||||
if (Constant.CATCH_ALL) {
|
if (Constant.CATCH_ALL) {
|
||||||
@ -258,6 +269,13 @@ class PersonalCenterFragment(private var indoorDataListener: ((Boolean) -> Unit?
|
|||||||
it.title = "隐藏Marker"
|
it.title = "隐藏Marker"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
R.id.personal_center_menu_trace -> {
|
||||||
|
if (Constant.MapTraceCloseEnable) {
|
||||||
|
it.title = "显示轨迹"
|
||||||
|
} else {
|
||||||
|
it.title = "隐藏轨迹"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -425,12 +425,20 @@ class TaskViewModel @Inject constructor(
|
|||||||
//删除已下载的数据
|
//删除已下载的数据
|
||||||
val fileTemp = File("${Constant.DOWNLOAD_PATH}${taskBean.evaluationTaskName}_${taskBean.dataVersion}.zip")
|
val fileTemp = File("${Constant.DOWNLOAD_PATH}${taskBean.evaluationTaskName}_${taskBean.dataVersion}.zip")
|
||||||
if(fileTemp.exists()){
|
if(fileTemp.exists()){
|
||||||
fileTemp.deleteOnExit()
|
fileTemp.delete()
|
||||||
}
|
}
|
||||||
val taskFileTemp = File(Constant.USER_DATA_PATH + "/${taskBean.id}")
|
val taskFileTemp = File(Constant.USER_DATA_PATH + "/${taskBean.id}")
|
||||||
//重命名
|
//重命名
|
||||||
if(taskFileTemp.exists()){
|
if(taskFileTemp.exists()){
|
||||||
taskFileTemp.renameTo(File(Constant.USER_DATA_PATH + "/${taskBean.id}-back-${DateTimeUtil.getNowDate().time}"))
|
var currentSelectTaskFolder = File(Constant.USER_DATA_PATH + "/${taskBean.id}")
|
||||||
|
var currentSelectTaskConfig =
|
||||||
|
RealmConfiguration.Builder().directory(currentSelectTaskFolder)
|
||||||
|
.name("OMQS.realm").encryptionKey(Constant.PASSWORD).allowQueriesOnUiThread(true)
|
||||||
|
.schemaVersion(2).build()
|
||||||
|
//删除已有所有数据
|
||||||
|
Realm.getInstance(currentSelectTaskConfig).deleteAll()
|
||||||
|
Realm.getInstance(currentSelectTaskConfig).refresh()
|
||||||
|
Realm.getInstance(currentSelectTaskConfig).close()
|
||||||
}
|
}
|
||||||
//将下载状态修改已下载
|
//将下载状态修改已下载
|
||||||
val realm = realmOperateHelper.getRealmDefaultInstance()
|
val realm = realmOperateHelper.getRealmDefaultInstance()
|
||||||
@ -453,7 +461,11 @@ class TaskViewModel @Inject constructor(
|
|||||||
liveDataTaskList.postValue(taskList)
|
liveDataTaskList.postValue(taskList)
|
||||||
realm.close()
|
realm.close()
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
setSelectTaskBean(taskBean)
|
if(taskBean.id== currentSelectTaskBean?.id ?: 0){
|
||||||
|
mapController.layerManagerHandler.updateOMDBVectorTileLayer()
|
||||||
|
}else{
|
||||||
|
setSelectTaskBean(taskBean)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
349
app/src/main/java/com/navinfo/omqs/util/CMLog.java
Normal file
@ -0,0 +1,349 @@
|
|||||||
|
package com.navinfo.omqs.util;
|
||||||
|
|
||||||
|
import android.app.ActivityManager;
|
||||||
|
import android.app.ActivityManager.MemoryInfo;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.navinfo.omqs.Constant;
|
||||||
|
|
||||||
|
import java.io.BufferedWriter;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileWriter;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 带日志文件输入的,又可控开关的日志调试
|
||||||
|
*
|
||||||
|
* @author qj
|
||||||
|
* @version 1.0
|
||||||
|
* @data 2016-8-23
|
||||||
|
*/
|
||||||
|
public class CMLog {
|
||||||
|
//CrashHandler实例
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static CMLog instance;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static Boolean MYLOG_SWITCH = true; //日志文件总开关
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static Boolean MYLOG_WRITE_TO_FILE = true;//日志写入文件开关
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static char MYLOG_TYPE = 'v';//输入日志类型,w代表只输出告警信息等,v代表输出所有信息
|
||||||
|
// private static String MYLOG_PATH_SDCARD_DIR = FMConstant.USER_DATA_LOG_PATH;// 日志文件在sdcard中的路径
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static int SDCARD_LOG_FILE_SAVE_DAYS = 0;// sd卡中日志文件的最多保存天数
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static String MYLOGFILEName = "Log.txt";// 本类输出的日志文件名称
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static String STACKLOGFILEName = "StackLog.txt";// 本类输出的日志文件名称
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static SimpleDateFormat myLogSdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//日志的输出格式
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static SimpleDateFormat logfile = new SimpleDateFormat("yyyy-MM-dd-HH");//日志文件格式
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static Context mContext;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static boolean flag;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static int count = 0;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取CrashHandler实例 ,单例模式
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static CMLog getInstance() {
|
||||||
|
if (instance == null)
|
||||||
|
instance = new CMLog();
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化
|
||||||
|
* @param context
|
||||||
|
*/
|
||||||
|
public void init(Context context) {
|
||||||
|
mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param tag
|
||||||
|
* @param msg
|
||||||
|
*/
|
||||||
|
public static void w(String tag, Object msg) {//警告信息
|
||||||
|
log(tag, msg.toString(), 'w');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param tag
|
||||||
|
* @param msg
|
||||||
|
*/
|
||||||
|
public static void e(String tag, Object msg) {//错误信息
|
||||||
|
log(tag, msg.toString(), 'e');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param tag
|
||||||
|
* @param msg
|
||||||
|
*/
|
||||||
|
public static void d(String tag, Object msg) {//调试信息
|
||||||
|
log(tag, msg.toString(), 'd');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param tag
|
||||||
|
* @param msg
|
||||||
|
*/
|
||||||
|
public static void i(String tag, Object msg) {//
|
||||||
|
log(tag, msg.toString(), 'i');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param tag
|
||||||
|
* @param msg
|
||||||
|
*/
|
||||||
|
public static void v(String tag, Object msg) {
|
||||||
|
log(tag, msg.toString(), 'v');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param tag
|
||||||
|
* @param text
|
||||||
|
*/
|
||||||
|
public static void w(String tag, String text) {
|
||||||
|
log(tag, text, 'w');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param tag
|
||||||
|
* @param text
|
||||||
|
*/
|
||||||
|
public static void e(String tag, String text) {
|
||||||
|
log(tag, text, 'e');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param tag
|
||||||
|
* @param text
|
||||||
|
*/
|
||||||
|
public static void d(String tag, String text) {
|
||||||
|
log(tag, text, 'd');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param tag
|
||||||
|
* @param text
|
||||||
|
*/
|
||||||
|
public static void i(String tag, String text) {
|
||||||
|
log(tag, text, 'i');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param tag
|
||||||
|
* @param text
|
||||||
|
*/
|
||||||
|
public static void v(String tag, String text) {
|
||||||
|
log(tag, text, 'v');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据tag, msg和等级,输出日志
|
||||||
|
*
|
||||||
|
* @param tag
|
||||||
|
* @param msg
|
||||||
|
* @param level
|
||||||
|
* @return void
|
||||||
|
* @since v 1.0
|
||||||
|
*/
|
||||||
|
private static void log(String tag, String msg, char level) {
|
||||||
|
if (MYLOG_SWITCH) {
|
||||||
|
if ('e' == level && ('e' == MYLOG_TYPE || 'v' == MYLOG_TYPE)) { // 输出错误信息
|
||||||
|
Log.e(tag, msg);
|
||||||
|
} else if ('w' == level && ('w' == MYLOG_TYPE || 'v' == MYLOG_TYPE)) {
|
||||||
|
Log.w(tag, msg);
|
||||||
|
} else if ('d' == level && ('d' == MYLOG_TYPE || 'v' == MYLOG_TYPE)) {
|
||||||
|
Log.d(tag, msg);
|
||||||
|
} else if ('i' == level && ('d' == MYLOG_TYPE || 'v' == MYLOG_TYPE)) {
|
||||||
|
Log.i(tag, msg);
|
||||||
|
} else {
|
||||||
|
Log.v(tag, msg);
|
||||||
|
}
|
||||||
|
if (MYLOG_WRITE_TO_FILE)
|
||||||
|
writeLogtoFile(String.valueOf(level), tag, msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打开日志文件并写入日志
|
||||||
|
*
|
||||||
|
* @param mylogtype
|
||||||
|
* @param tag
|
||||||
|
* @param text
|
||||||
|
**/
|
||||||
|
public static void writeLogtoFile(String mylogtype, String tag, String text) {
|
||||||
|
if (!flag&&MYLOG_WRITE_TO_FILE) {
|
||||||
|
flag = true;
|
||||||
|
try {
|
||||||
|
Log.e("jingo", "日志写入0");
|
||||||
|
// 新建或打开日志文件
|
||||||
|
Date nowtime = new Date();
|
||||||
|
String needWriteFiel = logfile.format(nowtime);
|
||||||
|
// String needWriteMessage = myLogSdf.format(nowtime) + " " + mylogtype
|
||||||
|
String needWriteMessage = simpleDateFormat.format(nowtime) + " " + mylogtype
|
||||||
|
+ " " + count + " " + tag + " " + text + "\r\n";
|
||||||
|
//输出内存使用情况
|
||||||
|
ActivityManager activityManager = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE);
|
||||||
|
MemoryInfo memoryInfo = new MemoryInfo();
|
||||||
|
activityManager.getMemoryInfo(memoryInfo);
|
||||||
|
/* needWriteMessage += " 系统剩余内存: " + (memoryInfo.availMem / 1024) + "(KB)\n";
|
||||||
|
needWriteMessage += " 系统是否处于低内存运行: " + memoryInfo.lowMemory + "\n";
|
||||||
|
needWriteMessage += " 当系统剩余内存低于: " + (memoryInfo.threshold / 1024) + "(KB)\n";*/
|
||||||
|
if (new File(Constant.USER_DATA_LOG_PATH).exists() == false) {
|
||||||
|
new File(Constant.USER_DATA_LOG_PATH).mkdirs();
|
||||||
|
}
|
||||||
|
File file = new File(Constant.USER_DATA_LOG_PATH, needWriteFiel + MYLOGFILEName);
|
||||||
|
Log.e("jingo", "日志写入1");
|
||||||
|
|
||||||
|
if (!file.exists())
|
||||||
|
file.createNewFile();
|
||||||
|
Log.e("jingo", "日志写入2");
|
||||||
|
|
||||||
|
FileWriter filerWriter = new FileWriter(file, true);//后面这个参数代表是不是要接上文件中原来的数据,不进行覆盖
|
||||||
|
BufferedWriter bufWriter = new BufferedWriter(filerWriter);
|
||||||
|
bufWriter.write(needWriteMessage);
|
||||||
|
bufWriter.newLine();
|
||||||
|
bufWriter.close();
|
||||||
|
filerWriter.close();
|
||||||
|
Log.e("jingo", "日志写入结束");
|
||||||
|
} catch (Exception e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
count ++;
|
||||||
|
|
||||||
|
if(count>10000){
|
||||||
|
count = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 写入调用栈的信息,包括文件名,行号,接口名称
|
||||||
|
*
|
||||||
|
* @param extMsg 扩展信息,如果不为NULL,则输出到栈信息之前
|
||||||
|
*/
|
||||||
|
public static void writeStackLogtoFile(String extMsg) {// 新建或打开日志文件
|
||||||
|
StackTraceElement[] eles = Thread.currentThread().getStackTrace();
|
||||||
|
Date nowtime = new Date();
|
||||||
|
String needWriteFiel = logfile.format(nowtime);
|
||||||
|
String needWriteMessage = "[Java Stack]:" + myLogSdf.format(nowtime) + "\n";
|
||||||
|
|
||||||
|
if(eles!=null&&eles.length>3){
|
||||||
|
needWriteMessage += "\t file name :" + eles[3].getFileName() + "\n";
|
||||||
|
needWriteMessage += "\t line num :" + eles[3].getLineNumber() + "\n";
|
||||||
|
needWriteMessage += "\t class name:" + eles[3].getClassName() + "\n";
|
||||||
|
needWriteMessage += "\t method :" + eles[3].getMethodName() + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (extMsg != null && extMsg.length() > 0) {
|
||||||
|
needWriteMessage += "\t extMsg :" + extMsg + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (new File(Constant.USER_DATA_LOG_PATH).exists() == false) {
|
||||||
|
new File(Constant.USER_DATA_LOG_PATH).mkdirs();
|
||||||
|
}
|
||||||
|
File file = new File(Constant.USER_DATA_LOG_PATH, needWriteFiel
|
||||||
|
+ STACKLOGFILEName);
|
||||||
|
try {
|
||||||
|
FileWriter filerWriter = new FileWriter(file, true);//后面这个参数代表是不是要接上文件中原来的数据,不进行覆盖
|
||||||
|
BufferedWriter bufWriter = new BufferedWriter(filerWriter);
|
||||||
|
bufWriter.write(needWriteMessage);
|
||||||
|
bufWriter.newLine();
|
||||||
|
bufWriter.close();
|
||||||
|
filerWriter.close();
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除制定的日志文件
|
||||||
|
*/
|
||||||
|
public static void delFile() {// 删除日志文件
|
||||||
|
String needDelFiel = logfile.format(getDateBefore());
|
||||||
|
File file = new File(Constant.USER_DATA_LOG_PATH, needDelFiel + MYLOGFILEName);
|
||||||
|
if (file.exists()) {
|
||||||
|
file.delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 得到现在时间前的几天日期,用来得到需要删除的日志文件名
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private static Date getDateBefore() {
|
||||||
|
Date nowtime = new Date();
|
||||||
|
Calendar now = Calendar.getInstance();
|
||||||
|
now.setTime(nowtime);
|
||||||
|
now.set(Calendar.DATE, now.get(Calendar.DATE)
|
||||||
|
- SDCARD_LOG_FILE_SAVE_DAYS);
|
||||||
|
return now.getTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
//输出错误日志
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 得到现在时间前的几天日期,用来得到需要删除的日志文件名
|
||||||
|
* @param e
|
||||||
|
* @param TAG
|
||||||
|
*/
|
||||||
|
public static void writeStackLogtoFile(Exception e, String TAG) {
|
||||||
|
String errorInfo = "";
|
||||||
|
for (int i = 0; i < e.getStackTrace().length; i++) {
|
||||||
|
errorInfo += e.getStackTrace()[i];
|
||||||
|
}
|
||||||
|
writeLogtoFile("异常崩溃", "异常", "异常信息:" + errorInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mylogWriteToFile
|
||||||
|
*/
|
||||||
|
public static void setMylogWriteToFile(Boolean mylogWriteToFile) {
|
||||||
|
MYLOG_WRITE_TO_FILE = mylogWriteToFile;
|
||||||
|
}
|
||||||
|
}
|
@ -73,6 +73,7 @@ class NaviEngine(
|
|||||||
DataCodeEnum.OMDB_TRAFFICLIGHT.name,
|
DataCodeEnum.OMDB_TRAFFICLIGHT.name,
|
||||||
// DataCodeEnum.OMDB_RESTRICTION.name,
|
// DataCodeEnum.OMDB_RESTRICTION.name,
|
||||||
DataCodeEnum.OMDB_LANEINFO.name,
|
DataCodeEnum.OMDB_LANEINFO.name,
|
||||||
|
DataCodeEnum.OMDB_CLM_LANEINFO.name,
|
||||||
DataCodeEnum.OMDB_TRAFFIC_SIGN.name,
|
DataCodeEnum.OMDB_TRAFFIC_SIGN.name,
|
||||||
DataCodeEnum.OMDB_WARNINGSIGN.name,
|
DataCodeEnum.OMDB_WARNINGSIGN.name,
|
||||||
DataCodeEnum.OMDB_TOLLGATE.name
|
DataCodeEnum.OMDB_TOLLGATE.name
|
||||||
|
@ -107,7 +107,7 @@ class SignUtil {
|
|||||||
//物理车道数OMDB_PHY_LANENUM
|
//物理车道数OMDB_PHY_LANENUM
|
||||||
DataCodeEnum.OMDB_LANE_NUM.code,
|
DataCodeEnum.OMDB_LANE_NUM.code,
|
||||||
DataCodeEnum.OMDB_PHY_LANENUM.code -> {
|
DataCodeEnum.OMDB_PHY_LANENUM.code -> {
|
||||||
"${data.properties["laneNum"]}|${data.properties["laneS2e"]}|${data.properties["laneE2s"]}"
|
"${data.properties["laneS2e"]}|${data.properties["laneE2s"]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
//常规点限速,条件点限速
|
//常规点限速,条件点限速
|
||||||
@ -286,11 +286,11 @@ class SignUtil {
|
|||||||
//车道数//增加物理车道数DataCodeEnum.OMDB_PHY_LANENUM.code
|
//车道数//增加物理车道数DataCodeEnum.OMDB_PHY_LANENUM.code
|
||||||
DataCodeEnum.OMDB_PHY_LANENUM.code,
|
DataCodeEnum.OMDB_PHY_LANENUM.code,
|
||||||
DataCodeEnum.OMDB_LANE_NUM.code -> {
|
DataCodeEnum.OMDB_LANE_NUM.code -> {
|
||||||
list.add(
|
/* list.add(
|
||||||
TwoItemAdapterItem(
|
TwoItemAdapterItem(
|
||||||
title = "车道总数", text = "${data.properties["laneNum"]}"
|
title = "车道总数", text = "${data.properties["laneNum"]}"
|
||||||
)
|
)
|
||||||
)
|
)*/
|
||||||
list.add(
|
list.add(
|
||||||
TwoItemAdapterItem(
|
TwoItemAdapterItem(
|
||||||
title = "顺方向车道数", text = "${data.properties["laneS2e"]}"
|
title = "顺方向车道数", text = "${data.properties["laneS2e"]}"
|
||||||
@ -1426,14 +1426,14 @@ class SignUtil {
|
|||||||
)
|
)
|
||||||
DataCodeEnum.OMDB_RD_LINK_KIND.code -> stringBuffer.append("种别${item.iconText},")
|
DataCodeEnum.OMDB_RD_LINK_KIND.code -> stringBuffer.append("种别${item.iconText},")
|
||||||
DataCodeEnum.OMDB_LINK_DIRECT.code -> stringBuffer.append("${item.iconText},")
|
DataCodeEnum.OMDB_LINK_DIRECT.code -> stringBuffer.append("${item.iconText},")
|
||||||
DataCodeEnum.OMDB_PHY_LANENUM.code,//物理车道数
|
/* DataCodeEnum.OMDB_PHY_LANENUM.code,//物理车道数
|
||||||
DataCodeEnum.OMDB_LANE_NUM.code -> stringBuffer.append(
|
DataCodeEnum.OMDB_LANE_NUM.code -> stringBuffer.append(
|
||||||
"${
|
"${
|
||||||
item.iconText.substringBefore(
|
item.iconText.substringBefore(
|
||||||
"|"
|
"|"
|
||||||
)
|
)
|
||||||
}车道"
|
}车道"
|
||||||
)
|
)*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return stringBuffer.toString()
|
return stringBuffer.toString()
|
||||||
|
@ -48,12 +48,17 @@
|
|||||||
android:title="锁定地图旋转及视角" />
|
android:title="锁定地图旋转及视角" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/personal_center_menu_marker"
|
android:id="@+id/personal_center_menu_marker"
|
||||||
android:icon="@drawable/baseline_person_24"
|
android:icon="@drawable/baseline_map_24"
|
||||||
android:visible="true"
|
android:visible="true"
|
||||||
android:title="隐藏Marker" />
|
android:title="隐藏Marker" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/personal_center_menu_trace"
|
||||||
|
android:icon="@drawable/baseline_map_24"
|
||||||
|
android:visible="true"
|
||||||
|
android:title="隐藏轨迹" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/personal_center_menu_catch_all"
|
android:id="@+id/personal_center_menu_catch_all"
|
||||||
android:icon="@drawable/baseline_person_24"
|
android:icon="@drawable/baseline_map_24"
|
||||||
android:visible="true"
|
android:visible="true"
|
||||||
android:title="全要素捕捉" />
|
android:title="全要素捕捉" />
|
||||||
<item
|
<item
|
||||||
|
@ -1558,7 +1558,11 @@
|
|||||||
<symbol repeat="false" repeat-start="0" repeat-gap="2000"
|
<symbol repeat="false" repeat-start="0" repeat-gap="2000"
|
||||||
src="@symbol" symbol-height="24" degree="90"></symbol>
|
src="@symbol" symbol-height="24" degree="90"></symbol>
|
||||||
</m>
|
</m>
|
||||||
|
<!-- 车信CLM -->
|
||||||
|
<m v="OMDB_CLM_LANEINFO" >
|
||||||
|
<symbol repeat="false" repeat-start="0" repeat-gap="2000"
|
||||||
|
src="@symbol" symbol-height="24" degree="90"></symbol>
|
||||||
|
</m>
|
||||||
<!-- 杆状物 -->
|
<!-- 杆状物 -->
|
||||||
<m v="OMDB_POLE">
|
<m v="OMDB_POLE">
|
||||||
<symbol src="assets:omdb/icon_pole_3006.svg" symbol-height="56" symbol-width="56"></symbol>
|
<symbol src="assets:omdb/icon_pole_3006.svg" symbol-height="56" symbol-width="56"></symbol>
|
||||||
@ -1720,22 +1724,22 @@
|
|||||||
<m k="markType" v="6">
|
<m k="markType" v="6">
|
||||||
<!--其他|实线-->
|
<!--其他|实线-->
|
||||||
<m k="markColor" v="1">
|
<m k="markColor" v="1">
|
||||||
<symbol repeat="true" repeat-start="0" repeat-gap="24" src="assets:omdb/icon_2013_1.svg"/>
|
<symbol repeat="true" repeat-start="0" repeat-gap="32" symbol-height="8" symbol-width="8" src="assets:omdb/icon_2013_1.svg"/>
|
||||||
</m>
|
</m>
|
||||||
<m k="markColor" v="2">
|
<m k="markColor" v="2">
|
||||||
<symbol repeat="true" repeat-start="0" repeat-gap="24" src="assets:omdb/icon_2013_2.svg"></symbol>
|
<symbol repeat="true" repeat-start="0" repeat-gap="32" symbol-height="8" symbol-width="8" src="assets:omdb/icon_2013_2.svg"></symbol>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m k="markColor" v="6">
|
<m k="markColor" v="6">
|
||||||
<symbol repeat="true" repeat-start="0" repeat-gap="24" src="assets:omdb/icon_2013_6.svg"></symbol>
|
<symbol repeat="true" repeat-start="0" repeat-gap="32" symbol-height="8" symbol-width="8" src="assets:omdb/icon_2013_6.svg"></symbol>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m k="markColor" v="7">
|
<m k="markColor" v="7">
|
||||||
<symbol repeat="true" repeat-start="0" repeat-gap="24" src="assets:omdb/icon_2013_7.svg"></symbol>
|
<symbol repeat="true" repeat-start="0" repeat-gap="32" symbol-height="8" symbol-width="8" src="assets:omdb/icon_2013_7.svg"></symbol>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<m k="markColor" v="0|9">
|
<m k="markColor" v="0|9">
|
||||||
<symbol repeat="true" repeat-start="0" repeat-gap="24" src="assets:omdb/icon_2013_0.svg"></symbol>
|
<symbol repeat="true" repeat-start="0" repeat-gap="32" symbol-height="8" symbol-width="8" src="assets:omdb/icon_2013_0.svg"></symbol>
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
<svg id="b" xmlns="http://www.w3.org/2000/svg" width="136.1" height="113.4"
|
||||||
<svg t="1695622778812" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
viewBox="0 0 136.1 113.4">
|
||||||
xmlns="http://www.w3.org/2000/svg" p-id="8830" xmlns:xlink="http://www.w3.org/1999/xlink"
|
<g id="c">
|
||||||
width="48" height="48">
|
<g>
|
||||||
<path
|
<rect width="136.1" height="113.4" style="fill:none;" />
|
||||||
d="M284.444444 227.555556h739.555556L739.555556 796.444444H0L284.444444 227.555556z m26.368 42.666666l-241.777777 483.555556h644.152889l241.777777-483.555556H310.812444z"
|
<polygon points="109.7 56.7 0 56.7 26.4 0 136.1 0 109.7 56.7" style="fill:#8e44ad;" />
|
||||||
fill="#8e44ad" p-id="8831"></path>
|
</g>
|
||||||
<path d="M310.812444 270.222222l-241.777777 483.555556h644.152889l241.777777-483.555556z"
|
</g>
|
||||||
fill="#8e44ad" fill-opacity=".99" p-id="8832"></path>
|
|
||||||
</svg>
|
</svg>
|
Before Width: | Height: | Size: 730 B After Width: | Height: | Size: 369 B |
@ -1,11 +1,10 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
<svg id="b" xmlns="http://www.w3.org/2000/svg" width="136.1" height="113.4"
|
||||||
<svg t="1695622778812" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
viewBox="0 0 136.1 113.4">
|
||||||
xmlns="http://www.w3.org/2000/svg" p-id="8830" xmlns:xlink="http://www.w3.org/1999/xlink"
|
<g id="c">
|
||||||
width="48" height="48">
|
<g>
|
||||||
<path
|
<rect width="136.1" height="113.4" style="fill:none;" />
|
||||||
d="M284.444444 227.555556h739.555556L739.555556 796.444444H0L284.444444 227.555556z m26.368 42.666666l-241.777777 483.555556h644.152889l241.777777-483.555556H310.812444z"
|
<polygon points="109.7 56.7 0 56.7 26.4 0 136.1 0 109.7 56.7" style="fill:#fff;" />
|
||||||
fill="#ffffff" p-id="8831"></path>
|
</g>
|
||||||
<path d="M310.812444 270.222222l-241.777777 483.555556h644.152889l241.777777-483.555556z"
|
</g>
|
||||||
fill="#ffffff" fill-opacity=".99" p-id="8832"></path>
|
|
||||||
</svg>
|
</svg>
|
Before Width: | Height: | Size: 730 B After Width: | Height: | Size: 366 B |
@ -1,11 +1,10 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
<svg id="b" xmlns="http://www.w3.org/2000/svg" width="136.1" height="113.4"
|
||||||
<svg t="1695622778812" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
viewBox="0 0 136.1 113.4">
|
||||||
xmlns="http://www.w3.org/2000/svg" p-id="8830" xmlns:xlink="http://www.w3.org/1999/xlink"
|
<g id="c">
|
||||||
width="48" height="48">
|
<g>
|
||||||
<path
|
<rect width="136.1" height="113.4" style="fill:none;" />
|
||||||
d="M284.444444 227.555556h739.555556L739.555556 796.444444H0L284.444444 227.555556z m26.368 42.666666l-241.777777 483.555556h644.152889l241.777777-483.555556H310.812444z"
|
<polygon points="109.7 56.7 0 56.7 26.4 0 136.1 0 109.7 56.7" style="fill:#eccc68;" />
|
||||||
fill="#eccc68" p-id="8831"></path>
|
</g>
|
||||||
<path d="M310.812444 270.222222l-241.777777 483.555556h644.152889l241.777777-483.555556z"
|
</g>
|
||||||
fill="#eccc68" fill-opacity=".99" p-id="8832"></path>
|
|
||||||
</svg>
|
</svg>
|
Before Width: | Height: | Size: 730 B After Width: | Height: | Size: 369 B |
@ -1,11 +1,10 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
<svg id="b" xmlns="http://www.w3.org/2000/svg" width="136.1" height="113.4"
|
||||||
<svg t="1695622778812" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
viewBox="0 0 136.1 113.4">
|
||||||
xmlns="http://www.w3.org/2000/svg" p-id="8830" xmlns:xlink="http://www.w3.org/1999/xlink"
|
<g id="c">
|
||||||
width="48" height="48">
|
<g>
|
||||||
<path
|
<rect width="136.1" height="113.4" style="fill:none;" />
|
||||||
d="M284.444444 227.555556h739.555556L739.555556 796.444444H0L284.444444 227.555556z m26.368 42.666666l-241.777777 483.555556h644.152889l241.777777-483.555556H310.812444z"
|
<polygon points="109.7 56.7 0 56.7 26.4 0 136.1 0 109.7 56.7" style="fill:#0000ff;" />
|
||||||
fill="#0000ff" p-id="8831"></path>
|
</g>
|
||||||
<path d="M310.812444 270.222222l-241.777777 483.555556h644.152889l241.777777-483.555556z"
|
</g>
|
||||||
fill="#0000ff" fill-opacity=".99" p-id="8832"></path>
|
|
||||||
</svg>
|
</svg>
|
Before Width: | Height: | Size: 730 B After Width: | Height: | Size: 369 B |
@ -1,11 +1,10 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
<svg id="b" xmlns="http://www.w3.org/2000/svg" width="136.1" height="113.4"
|
||||||
<svg t="1695622778812" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
viewBox="0 0 136.1 113.4">
|
||||||
xmlns="http://www.w3.org/2000/svg" p-id="8830" xmlns:xlink="http://www.w3.org/1999/xlink"
|
<g id="c">
|
||||||
width="48" height="48">
|
<g>
|
||||||
<path
|
<rect width="136.1" height="113.4" style="fill:none;" />
|
||||||
d="M284.444444 227.555556h739.555556L739.555556 796.444444H0L284.444444 227.555556z m26.368 42.666666l-241.777777 483.555556h644.152889l241.777777-483.555556H310.812444z"
|
<polygon points="109.7 56.7 0 56.7 26.4 0 136.1 0 109.7 56.7" style="fill:#00ff00;" />
|
||||||
fill="#00ff00" p-id="8831"></path>
|
</g>
|
||||||
<path d="M310.812444 270.222222l-241.777777 483.555556h644.152889l241.777777-483.555556z"
|
</g>
|
||||||
fill="#00ff00" fill-opacity=".99" p-id="8832"></path>
|
|
||||||
</svg>
|
</svg>
|
Before Width: | Height: | Size: 730 B After Width: | Height: | Size: 369 B |
@ -81,6 +81,7 @@ enum class DataCodeEnum(var tableName: String, var code: String) {
|
|||||||
OMDB_TRAFFICLIGHT("交通灯", "4022"),
|
OMDB_TRAFFICLIGHT("交通灯", "4022"),
|
||||||
OMDB_TOLLGATE("收费站", "4023"),
|
OMDB_TOLLGATE("收费站", "4023"),
|
||||||
OMDB_LANEINFO("车信", "4601"),
|
OMDB_LANEINFO("车信", "4601"),
|
||||||
|
OMDB_CLM_LANEINFO("车信CLM", "4602"),
|
||||||
OMDB_LANE_LINK_LG("车道中心线", "5001");
|
OMDB_LANE_LINK_LG("车道中心线", "5001");
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -171,7 +171,7 @@ class LocationLayerHandler(context: AppCompatActivity, mapView: NIMapView) :
|
|||||||
mCurrentLocation?.run {
|
mCurrentLocation?.run {
|
||||||
val mapPosition = mMapView.vtmMap.mapPosition
|
val mapPosition = mMapView.vtmMap.mapPosition
|
||||||
mapPosition.setPosition(this.latitude, this.longitude)
|
mapPosition.setPosition(this.latitude, this.longitude)
|
||||||
mMapView.vtmMap.animator().animateTo(300, mapPosition)
|
mMapView.vtmMap.animator().animateTo(800, mapPosition)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,8 +43,16 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
|||||||
*/
|
*/
|
||||||
private val mDefaultTextColor = "#4E55AF"
|
private val mDefaultTextColor = "#4E55AF"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 默认Marker可用状态
|
||||||
|
*/
|
||||||
private var markerEnable = true
|
private var markerEnable = true
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 默认轨迹可用状态
|
||||||
|
*/
|
||||||
|
private var traceMarkerEnable = true
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文字画笔
|
* 文字画笔
|
||||||
*/
|
*/
|
||||||
@ -277,13 +285,16 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
|||||||
// 设置矢量图层均在12级以上才显示
|
// 设置矢量图层均在12级以上才显示
|
||||||
mMapView.vtmMap.events.bind(Map.UpdateListener { e, mapPosition ->
|
mMapView.vtmMap.events.bind(Map.UpdateListener { e, mapPosition ->
|
||||||
if (e == Map.SCALE_EVENT) {
|
if (e == Map.SCALE_EVENT) {
|
||||||
if(markerEnable){
|
if (markerEnable) {
|
||||||
qsRecordItemizedLayer.isEnabled = mapPosition.getZoomLevel() >= 12
|
qsRecordItemizedLayer.isEnabled = mapPosition.getZoomLevel() >= 12
|
||||||
}else{
|
} else {
|
||||||
qsRecordItemizedLayer.isEnabled = false
|
qsRecordItemizedLayer.isEnabled = false
|
||||||
}
|
}
|
||||||
|
if (traceMarkerEnable) {
|
||||||
niLocationItemizedLayer.isEnabled = mapPosition.getZoomLevel() >= 12
|
niLocationItemizedLayer.isEnabled = mapPosition.getZoomLevel() >= 12
|
||||||
|
} else {
|
||||||
|
niLocationItemizedLayer.isEnabled = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -379,13 +390,26 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
|||||||
mMapView.updateMap(true)
|
mMapView.updateMap(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setQsRecordMarkEnable(enable:Boolean){
|
/**
|
||||||
|
* Marker是否显示
|
||||||
|
*/
|
||||||
|
fun setQsRecordMarkEnable(enable: Boolean) {
|
||||||
qsRecordItemizedLayer.isEnabled = enable
|
qsRecordItemizedLayer.isEnabled = enable
|
||||||
markerEnable = enable
|
markerEnable = enable
|
||||||
qsRecordItemizedLayer.populate()
|
qsRecordItemizedLayer.populate()
|
||||||
mMapView.updateMap(true)
|
mMapView.updateMap(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 轨迹是否显示
|
||||||
|
*/
|
||||||
|
fun setTraceMarkEnable(enable: Boolean) {
|
||||||
|
niLocationItemizedLayer.isEnabled = enable
|
||||||
|
traceMarkerEnable = enable
|
||||||
|
niLocationItemizedLayer.populate()
|
||||||
|
mMapView.updateMap(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 增加或更新便签
|
* 增加或更新便签
|
||||||
@ -520,11 +544,9 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
|||||||
* 添加质检数据marker
|
* 添加质检数据marker
|
||||||
*/
|
*/
|
||||||
fun addNiLocationMarkerItem(niLocation: NiLocation) {
|
fun addNiLocationMarkerItem(niLocation: NiLocation) {
|
||||||
synchronized(this) {
|
var geoMarkerItem = createNILocationBitmap(niLocation)
|
||||||
var geoMarkerItem = createNILocationBitmap(niLocation)
|
niLocationItemizedLayer.addItem(geoMarkerItem)
|
||||||
niLocationItemizedLayer.addItem(geoMarkerItem)
|
niLocationItemizedLayer.update()
|
||||||
niLocationItemizedLayer.update()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun createNILocationBitmap(niLocation: NiLocation): MarkerItem {
|
private fun createNILocationBitmap(niLocation: NiLocation): MarkerItem {
|
||||||
|