Merge branch 'master' of gitlab.navinfo.com:CollectVehicle/OneMapQS

This commit is contained in:
xiaoyan 2023-12-07 14:18:06 +08:00
commit 1eef357079
28 changed files with 3241 additions and 203 deletions

View File

@ -65,8 +65,8 @@
"table": "OMDB_LINK_NAME",
"code": 2011,
"name": "道路名",
"zoomMin": 18,
"zoomMax": 20,
"zoomMin": 15,
"zoomMax": 17,
"checkLinkId": false,
"transformer": [
{
@ -243,11 +243,6 @@
}
]
},
"2097": {
"table": "OMDB_PHY_LANENUM",
"code": 2097,
"name": "物理车道数"
},
"2201": {
"table": "OMDB_BRIDGE",
"code": 2201,
@ -282,6 +277,22 @@
}
]
},
"2617": {
"table": "OMDB_PHY_LANENUM",
"code": 2617,
"name": "物理车道数",
"zoomMin": 15,
"zoomMax": 18,
"catch": true,
"transformer": [
{
"k": "geometry",
"v": "~",
"klib": "geometry",
"vlib": "generatePhyName()"
}
]
},
"2638": {
"table": "OMDB_LANE_ACCESS",
"code": 2638,
@ -603,6 +614,7 @@
"zoomMin": 18,
"zoomMax": 20,
"filterData": true,
"checkLinkId": false,
"catch": true,
"transformer": [
{

View File

@ -194,12 +194,12 @@ class ImportOMDBHelper @AssistedInject constructor(
tableNum += importConfig.tableMap.size
}
//缓存任务link信息便于下面与数据进行任务link匹配
val hashMap: HashMap<Long, HadLinkDvoBean> = HashMap<Long, HadLinkDvoBean>()
val hashMap: HashMap<String, HadLinkDvoBean> = HashMap<String, HadLinkDvoBean>()
// val lineList = arrayOfNulls<LineString>(task.hadLinkDvoList.size)
// var index = 0
task.hadLinkDvoList.forEach {
hashMap[it.linkPid.toLong()] = it
hashMap[it.linkPid] = it
// lineList[index] = GeometryTools.createGeometry(it.geometry) as LineString
// index++
}
@ -310,7 +310,7 @@ class ImportOMDBHelper @AssistedInject constructor(
currentEntry: MutableMap.MutableEntry<String, TableInfo>,
task: TaskBean,
importConfig: ImportConfig,
hashMap: HashMap<Long, HadLinkDvoBean>,
hashMap: HashMap<String, HadLinkDvoBean>,
isEmit: Boolean = true) = callbackFlow <Event>{
val cancellable= importData(f,unZipFiles,currentEntry,task,importConfig,hashMap,isEmit,object :MultiPathsCallback<String>{
override fun onProgress(value: Int) {
@ -342,7 +342,7 @@ class ImportOMDBHelper @AssistedInject constructor(
currentEntry: MutableMap.MutableEntry<String, TableInfo>,
task: TaskBean,
importConfig: ImportConfig,
hashMap: HashMap<Long, HadLinkDvoBean>,
hashMap: HashMap<String, HadLinkDvoBean>,
isEmit: Boolean = true, callback: MultiPathsCallback<String>?
):NonCancellable {
val resHashMap: HashMap<String, RenderEntity> = HashMap() //define empty hashmap
@ -379,13 +379,6 @@ class ImportOMDBHelper @AssistedInject constructor(
}
newTime = System.currentTimeMillis()
// if (elementIndex % 50 == 0) {
// Log.e(
// "jingo",
// "安装数据 ${currentConfig.table} $elementIndex ${listRenderEntity.size} ${newTime - time}"
// )
// }
time = newTime
elementIndex += 1
@ -409,16 +402,25 @@ class ImportOMDBHelper @AssistedInject constructor(
renderEntity.zoomMin = map["qi_zoomMin"].toString().toInt()
renderEntity.zoomMax = map["qi_zoomMax"].toString().toInt()
//缓存当前数据对应的导航linkpid信息根据与任务对应关系保留任务唯一linkpid
var linkPidList = mutableListOf<String>()
// 在外层记录当前数据的linkPid
if (map.containsKey("linkPid")) {
renderEntity.linkPid = map["linkPid"].toString().split(",")[0]
if (map.containsKey("linkPid")&& map["linkPid"].toString().split(",").isNotEmpty()) {
linkPidList.addAll(map["linkPid"].toString().split(","))
} else if (map.containsKey("linkList")) {
val linkList = map["linkList"].toString()
if (!linkList.isNullOrEmpty() && linkList != "null") {
val list: List<LinkList> = gson.fromJson(
linkList, object : TypeToken<List<LinkList>>() {}.type
)
renderEntity.linkPid = list[0].linkPid
val list: List<LinkList> = gson.fromJson(linkList, object : TypeToken<List<LinkList>>() {}.type)
list.forEach {
linkPidList.add(it.linkPid)
}
}
}
@ -514,25 +516,16 @@ class ImportOMDBHelper @AssistedInject constructor(
//遍历判断只显示与任务Link相关的任务数据
if (currentConfig.checkLinkId) {
if (renderEntity.linkPid.isNotEmpty()) {
if (linkPidList.isNotEmpty()) {
val currentLinkPid = renderEntity.linkPid
if (!currentLinkPid.isNullOrEmpty() && currentLinkPid != "null") {
val list = currentLinkPid.split(",")
if (list.isNotEmpty()) {
m@ for (linkPid in list) {
if (hashMap.containsKey(linkPid.toLong())) {
renderEntity.enable = 1
break@m
}
}
m@ for (linkPid in linkPidList) {
Log.e("jingo", "$linkPid=======linkPid")
if (linkPid!=null&&hashMap.containsKey(linkPid)) {
renderEntity.enable = 1
renderEntity.linkPid = linkPid
break@m
}
}
} else if (renderEntity.code.toInt() == DataCodeEnum.OMDB_INTERSECTION.code.toInt() || renderEntity.code.toInt() == DataCodeEnum.OMDB_LANE_CONSTRUCTION.code.toInt() && renderEntity.properties.containsKey(
"linkList"
)
@ -548,8 +541,9 @@ class ImportOMDBHelper @AssistedInject constructor(
)
m@ for (link in list) {
if (hashMap.containsKey(link.linkPid.toLong())) {
if (hashMap.containsKey(link.linkPid)) {
renderEntity.enable = 1
renderEntity.linkPid = link.linkPid
break@m
}
}

View File

@ -271,7 +271,6 @@ class ImportPreProcess {
// 将这个起终点的线记录在数据中
val startReference = ReferenceEntity()
// startReference.renderEntityId = renderEntity.id
startReference.name = "${renderEntity.name}参考点"
startReference.code = renderEntity.code
startReference.table = renderEntity.table
@ -285,7 +284,6 @@ class ImportPreProcess {
startReference.properties["qi_table"] = renderEntity.table
startReference.properties["type"] =
"s${if (renderEntity.properties["laneType"]!!.toInt() and (0b1000) > 0) "_dec" else "_acc"}"
startReference.properties["geometry"] = startReference.geometry
startReference.propertiesDb = DeflaterUtil.zipString(JSON.toJSONString(startReference.properties))
renderEntity.referenceEntitys.add(startReference)
@ -304,7 +302,6 @@ class ImportPreProcess {
endReference.properties["qi_table"] = renderEntity.table
endReference.properties["type"] =
"e${if (renderEntity.properties["laneType"]!!.toInt() and (0b1000) > 0) "_dec" else "_acc"}"
endReference.properties["geometry"] = endReference.geometry
endReference.propertiesDb = DeflaterUtil.zipString(JSON.toJSONString(endReference.properties))
renderEntity.referenceEntitys.add(endReference)
}
@ -353,7 +350,6 @@ class ImportPreProcess {
Log.e("qj", "generateS2EReferencePoint===${startReference.geometry}")
startReference.properties["geometry"] = startReference.geometry
startReference.propertiesDb =
DeflaterUtil.zipString(JSON.toJSONString(startReference.properties))
listResult.add(startReference)
@ -388,7 +384,6 @@ class ImportPreProcess {
endReference.properties["type"] = "e_2_p"
Log.e("qj", "generateS2EReferencePoint===e_2_p${renderEntity.name}")
}
endReference.properties["geometry"] = endReference.geometry
endReference.propertiesDb =
DeflaterUtil.zipString(JSON.toJSONString(endReference.properties))
renderEntity.referenceEntitys.add(endReference)
@ -740,6 +735,15 @@ class ImportPreProcess {
}
}
/**
* 生成默认物理车道数据
* */
fun generatePhyName(renderEntity: RenderEntity) {
// 物理车道数
if (renderEntity.properties.containsKey("laneS2e")&&renderEntity.properties.containsKey("laneE2s")) {
renderEntity.properties["name"] = "${renderEntity.properties["laneS2e"]}|${renderEntity.properties["laneE2s"]}"
}
}
/**
* 生成默认道路名数据
@ -835,14 +839,24 @@ class ImportPreProcess {
when(renderEntity.properties["direct"]?.toInt()){
0,1,2->{
if (medianWidth != null) {
angleReference.geometry =
GeometryTools.computeLine(0.000012, 0.0, renderEntity.geometry)
if(side=="0"){
angleReference.geometry =
GeometryTools.computeLine(0.000015, 0.0, renderEntity.geometry)
}else{
angleReference.geometry =
GeometryTools.computeLine( 0.0, 0.000015,renderEntity.geometry)
}
}
}
3->{
if (medianWidth != null) {
angleReference.geometry =
GeometryTools.computeLine(0.0, 0.000012, renderEntity.geometry)
if(side=="0"){
angleReference.geometry =
GeometryTools.computeLine(0.0, 0.000015, renderEntity.geometry)
}else{
angleReference.geometry =
GeometryTools.computeLine(0.000015, 0.0, renderEntity.geometry)
}
}
}
}
@ -850,7 +864,7 @@ class ImportPreProcess {
angleReference.table = renderEntity.table
angleReference.code = renderEntity.code
angleReference.properties["qi_table"] = renderEntity.table
angleReference.properties["medianSurface"] = medianSurface.toString()
angleReference.properties["medianSurfaceGeometry"] = medianSurface.toString()
angleReference.zoomMin = renderEntity.zoomMin
angleReference.zoomMax = renderEntity.zoomMax
angleReference.taskId = renderEntity.taskId
@ -1224,6 +1238,8 @@ class ImportPreProcess {
if (renderEntity.properties.containsKey("maxSpeed") && renderEntity.properties.containsKey("minSpeed")) {
renderEntity.properties["ref"] =
"${renderEntity.properties["maxSpeed"]}|${renderEntity.properties["minSpeed"]}"
renderEntity.propertiesDb =
DeflaterUtil.zipString(JSON.toJSONString(renderEntity.properties))
}
}
@ -1243,13 +1259,11 @@ class ImportPreProcess {
val linkGeometry =
GeometryTools.createGeometry(zLevelObject.optString("linkGeometry"))
val coordinates = linkGeometry!!.coordinates
val referenceEntityList = mutableListOf<ReferenceEntity>()
// 判断当前数据的startEnd如果是0则向前和向后都绘制线如果是1起点则只绘制前两个点组成的线如果是2终点则只绘制后两个点组成的线
if (startEnd == 0 || startEnd == 1) { // 处理向后的线
val zLevelReference = createZLevelReference(renderEntity)
zLevelReference.properties["type"] = "zlevelLine"
// zLevelReference.properties["name"] = zLevel.toString()
// 根据shpSeqNum获取对应的点位
zLevelReference.propertiesDb = DeflaterUtil.zipString(JSON.toJSONString(zLevelReference.properties))
if (shpSeqNum < coordinates.size - 1) {
val currentCoordinate = coordinates[shpSeqNum]
var nextCoordinate = coordinates[shpSeqNum + 1]
@ -1279,26 +1293,25 @@ class ImportPreProcess {
), GeoPoint(nextCoordinate.y, nextCoordinate.x)
)
).toString()
referenceEntityList.add(zLevelReference)
renderEntity.referenceEntitys.add(zLevelReference)
val zLevelNameReference = createZLevelReference(renderEntity)
zLevelNameReference.properties["type"] = "zlevelName"
zLevelNameReference.properties["name"] = zLevel.toString()
zLevelNameReference.propertiesDb = DeflaterUtil.zipString(JSON.toJSONString(zLevelNameReference.properties))
zLevelNameReference.geometry = GeometryTools.createGeometry(
GeoPoint(
nextCoordinate.y,
nextCoordinate.x
)
).toString()
referenceEntityList.add(zLevelNameReference)
renderEntity.referenceEntitys.add(zLevelNameReference)
}
}
if (startEnd == 0 || startEnd == 2) { // 处理向前的线
val zLevelReference = createZLevelReference(renderEntity)
zLevelReference.properties["type"] = "zlevelLine"
// zLevelReference.properties["name"] = zLevel.toString()
zLevelReference.propertiesDb = DeflaterUtil.zipString(JSON.toJSONString(zLevelReference.properties))
// 根据shpSeqNum获取对应的点位
if (shpSeqNum < coordinates.size && shpSeqNum > 0) {
val currentCoordinate = coordinates[shpSeqNum]
@ -1320,7 +1333,6 @@ class ImportPreProcess {
// 计算偏移后的点
preCoordinate =
Coordinate(currentCoordinate.getX() + dx, currentCoordinate.getY() + dy)
// }
zLevelReference.geometry = GeometryTools.createLineString(
arrayListOf(
GeoPoint(
@ -1329,19 +1341,17 @@ class ImportPreProcess {
), GeoPoint(preCoordinate.y, preCoordinate.x)
)
).toString()
referenceEntityList.add(zLevelReference)
renderEntity.referenceEntitys.add(zLevelReference)
val zLevelNameReference = createZLevelReference(renderEntity)
zLevelNameReference.properties["type"] = "zlevelName"
zLevelNameReference.properties["name"] = zLevel.toString()
zLevelNameReference.propertiesDb = DeflaterUtil.zipString(JSON.toJSONString(zLevelNameReference.properties))
zLevelNameReference.geometry =
GeometryTools.createGeometry(GeoPoint(preCoordinate.y, preCoordinate.x))
.toString()
referenceEntityList.add(zLevelNameReference)
renderEntity.referenceEntitys.add(zLevelNameReference)
}
}
insertData(referenceEntityList)
// 移除zlevelList减小原始数据大小
renderEntity.properties.remove("zlevelList")
}

View File

@ -804,7 +804,7 @@ class MainViewModel @Inject constructor(
)
}
}
DataCodeEnum.OMDB_PHY_LANENUM.code,//物理车道数
//DataCodeEnum.OMDB_PHY_LANENUM.code,//物理车道数
DataCodeEnum.OMDB_LANE_NUM.code, //车道数
DataCodeEnum.OMDB_RD_LINK_KIND.code,//种别,
DataCodeEnum.OMDB_RD_LINK_FUNCTION_CLASS.code, // 功能等级,
@ -960,7 +960,7 @@ class MainViewModel @Inject constructor(
)
}
}
DataCodeEnum.OMDB_PHY_LANENUM.code,//物理车道数
//DataCodeEnum.OMDB_PHY_LANENUM.code,//物理车道数
DataCodeEnum.OMDB_LANE_NUM.code, //车道数
DataCodeEnum.OMDB_RD_LINK_KIND.code,//种别,
DataCodeEnum.OMDB_RD_LINK_FUNCTION_CLASS.code, // 功能等级,

View File

@ -6,6 +6,8 @@ import android.graphics.Bitmap
import android.os.Build
import android.os.Bundle
import android.provider.MediaStore
import android.text.Editable
import android.text.TextWatcher
import android.util.Log
import android.view.*
import android.widget.Toast
@ -90,6 +92,18 @@ class EvaluationResultFragment : BaseFragment(), View.OnClickListener {
}
binding.evaluationDescription.addTextChangedListener(object : TextWatcher {
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
}
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
}
override fun afterTextChanged(s: Editable?) {
viewModel.description = s.toString()
}
})
binding.evaluationVoiceRecyclerview.adapter = adapter
//返回按钮点击
@ -128,8 +142,6 @@ class EvaluationResultFragment : BaseFragment(), View.OnClickListener {
* 照片view
*/
binding.evaluationPictureViewpager.adapter = pictureAdapter
val list = mutableListOf("1", "2", "3")
pictureAdapter.refreshData(list)
//照片左右选择键点击监听
binding.evaluationPictureLeft.setOnClickListener(this)
@ -205,6 +217,13 @@ class EvaluationResultFragment : BaseFragment(), View.OnClickListener {
binding.evaluationDescription.setText(it)
}
/**
* 照片view
*/
viewModel.liveDataPictureList.observe(viewLifecycleOwner){
pictureAdapter.refreshData(it)
}
viewModel.listDataChatMsgEntityList.observe(viewLifecycleOwner) {
adapter.refreshData(it)
}

View File

@ -140,6 +140,8 @@ class EvaluationResultViewModel @Inject constructor(
var classCodeTemp: String = ""
var description = ""
init {
mapController.mMapView.addOnNIMapClickListener(TAG, object : OnGeoPointClickListener {
override fun onMapClick(tag: String, point: GeoPoint, other: String) {
@ -457,7 +459,7 @@ class EvaluationResultViewModel @Inject constructor(
liveDataToastMessage.postValue("没有绑定到任何link请选择")
return@launch
}
if (liveDataQsRecordBean.value!!.classCode == DataCodeEnum.OMDB_LANEINFO.code)
if (liveDataQsRecordBean.value!!.classCode == DataCodeEnum.OMDB_LANEINFO.code){
try {
val jsonObject: JSONObject = if (liveDataQsRecordBean.value!!.remarks != "") {
JSONObject(liveDataQsRecordBean.value!!.remarks)
@ -488,11 +490,16 @@ class EvaluationResultViewModel @Inject constructor(
jsonObject.put("now", jsonOriginalArray)
}
liveDataQsRecordBean.value!!.remarks = jsonObject.toString()
SignUtil.getLineInfoIcons(renderEntity!!)
Log.e("jingo", "车信json ${liveDataQsRecordBean.value!!.remarks}")
} catch (e: Exception) {
}
}else{
liveDataQsRecordBean.value!!.description = description
liveDataQsRecordBean.value!!.remarks = ""
}
Log.e("jingo", "车信json ${liveDataQsRecordBean.value!!.remarks}")
val realm = realmOperateHelper.getRealmDefaultInstance()
liveDataQsRecordBean.value!!.taskId = liveDataTaskBean.value!!.id
liveDataQsRecordBean.value!!.checkTime = DateTimeUtil.getDataTime()
@ -582,6 +589,8 @@ class EvaluationResultViewModel @Inject constructor(
} catch (e: Exception) {
}
}else{
}
launch(Dispatchers.Main) {
@ -614,6 +623,8 @@ class EvaluationResultViewModel @Inject constructor(
}
liveDataQsRecordBean.value?.attachmentBeanList = it.attachmentBeanList
liveDataLanInfoChange.postValue(it.description)
description = it.description
// 显示语音数据到界面
getChatMsgEntityList()
realm.close()
@ -808,14 +819,24 @@ class EvaluationResultViewModel @Inject constructor(
out.close()
val picList = mutableListOf<String>()
if (liveDataPictureList.value == null) {
picList.add(file.absolutePath)
picList.add(file.name)
} else {
picList.addAll(liveDataPictureList.value!!)
picList.add(file.absolutePath)
picList.add(file.name)
}
var attachmentList: RealmList<AttachmentBean> = RealmList()
//赋值处理
if (liveDataQsRecordBean.value?.attachmentBeanList?.isEmpty() == false) {
attachmentList = liveDataQsRecordBean.value?.attachmentBeanList!!
}
val attachmentBean = AttachmentBean()
attachmentBean.name = file.name!!
attachmentBean.type = 2
attachmentList.add(attachmentBean)
liveDataQsRecordBean.value?.attachmentBeanList = attachmentList
liveDataPictureList.postValue(picList)
}
}
/**

View File

@ -2,9 +2,13 @@ package com.navinfo.omqs.ui.fragment.evaluationresult
import android.view.LayoutInflater
import android.view.ViewGroup
import com.navinfo.omqs.Constant
import com.navinfo.omqs.R
import com.navinfo.omqs.databinding.AdapterPictureBinding
import com.navinfo.omqs.ui.other.BaseRecyclerViewAdapter
import com.navinfo.omqs.ui.other.BaseViewHolder
import com.navinfo.omqs.util.ImageTools
import java.io.File
class PictureAdapter : BaseRecyclerViewAdapter<String>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder {
@ -15,7 +19,18 @@ class PictureAdapter : BaseRecyclerViewAdapter<String>() {
override fun onBindViewHolder(holder: BaseViewHolder, position: Int) {
val bd = holder.viewBinding as AdapterPictureBinding
bd.button.text = data[position]
val myAppDir = File(Constant.USER_DATA_ATTACHEMNT_PATH)
if (!myAppDir.exists()) myAppDir.mkdirs() // 确保文件夹已创建
// 创建一个名为 fileName 的文件
val file = File(myAppDir, data[position])
if(file.exists()){
bd.showImage.setImageBitmap(ImageTools.zoomBitmap(Constant.USER_DATA_ATTACHEMNT_PATH+"/"+data[position],2))
}else{
bd.showImage.setBackgroundResource(R.drawable.icon_camera_img)
}
}
}

View File

@ -1,17 +1,40 @@
package com.navinfo.omqs.ui.fragment.note
import android.app.Activity
import android.content.Intent
import android.graphics.Bitmap
import android.os.Build
import android.os.Bundle
import android.provider.MediaStore
import android.text.Editable
import android.text.TextWatcher
import android.util.Log
import android.view.LayoutInflater
import android.view.MotionEvent
import android.view.View
import android.view.ViewGroup
import android.view.ViewTreeObserver
import android.widget.Toast
import androidx.activity.result.ActivityResult
import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.contract.ActivityResultContracts
import androidx.annotation.RequiresApi
import androidx.navigation.findNavController
import androidx.navigation.fragment.findNavController
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.navinfo.collect.library.enums.DataCodeEnum
import com.navinfo.omqs.Constant
import com.navinfo.omqs.R
import com.navinfo.omqs.databinding.FragmentNoteBinding
import com.navinfo.omqs.ui.dialog.FirstDialog
import com.navinfo.omqs.ui.fragment.BaseFragment
import com.navinfo.omqs.ui.fragment.evaluationresult.EvaluationResultFragment
import com.navinfo.omqs.ui.fragment.evaluationresult.EvaluationResultViewModel
import com.navinfo.omqs.ui.fragment.evaluationresult.PhenomenonFragment
import com.navinfo.omqs.ui.fragment.evaluationresult.PictureAdapter
import com.navinfo.omqs.ui.fragment.evaluationresult.ProblemLinkFragment
import com.navinfo.omqs.ui.fragment.evaluationresult.SoundtListAdapter
import com.navinfo.omqs.ui.other.shareViewModels
import dagger.hilt.android.AndroidEntryPoint
@ -20,8 +43,30 @@ class NoteFragment : BaseFragment(), View.OnClickListener {
private var _binding: FragmentNoteBinding? = null
private val binding get() = _binding!!
private var mCameraLauncher: ActivityResultLauncher<Intent>? = null
private val viewModel by shareViewModels<NoteViewModel>("note")
private val pictureAdapter by lazy {
PictureAdapter()
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
mCameraLauncher = registerForActivityResult(
ActivityResultContracts.StartActivityForResult()
) { result: ActivityResult ->
if (result.resultCode == Activity.RESULT_OK) {
// 处理相机返回的结果
val extras = result.data!!.extras
val imageBitmap: Bitmap? = extras!!["data"] as Bitmap?
// 在这里处理图片数据
if (imageBitmap != null)
viewModel.savePhoto(imageBitmap)
}
}
}
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
): View {
@ -29,7 +74,19 @@ class NoteFragment : BaseFragment(), View.OnClickListener {
return binding.root
}
@RequiresApi(Build.VERSION_CODES.N)
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
activity?.run {
findNavController(
R.id.main_activity_middle_fragment
).navigate(R.id.CanvasFragment)
}
//// 设置 RecyclerView 的固定大小,避免在滚动时重新计算视图大小和布局,提高性能
binding.noteVoiceRecyclerview.setHasFixedSize(true)
val layoutManager = LinearLayoutManager(context)
binding.noteVoiceRecyclerview.layoutManager = layoutManager
binding.sketchEraser.setOnClickListener(this)
binding.sketchClear.setOnClickListener(this)
binding.sketchForward.setOnClickListener(this)
@ -37,6 +94,7 @@ class NoteFragment : BaseFragment(), View.OnClickListener {
binding.noteBarSave.setOnClickListener(this)
binding.noteBarCancel.setOnClickListener(this)
binding.noteBarDelete.setOnClickListener(this)
binding.noteCamera.setOnClickListener(this)
binding.noteDescription.addTextChangedListener(object : TextWatcher {
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
}
@ -48,6 +106,30 @@ class NoteFragment : BaseFragment(), View.OnClickListener {
viewModel.noteBeanDescription = s.toString()
}
})
viewModel.liveDataNoteBean.observe(viewLifecycleOwner) {
binding.noteDescription.setText(it.description)
}
//监听要提示的信息
viewModel.liveDataToastMessage.observe(viewLifecycleOwner) {
Toast.makeText(requireContext(), it, Toast.LENGTH_SHORT).show()
}
/**
* 监听左侧栏的点击事件
*/
val adapter = SoundtListAdapter { _, _ ->
}
binding.noteVoiceRecyclerview.adapter = adapter
/**
* 照片view
*/
/**
* 照片view
*/
binding.notePictureViewpager.adapter = pictureAdapter
/**
* 数据操作结束
*/
@ -69,29 +151,107 @@ class NoteFragment : BaseFragment(), View.OnClickListener {
}
}
}
}
/**
* 音频view
*/
viewModel.listDataChatMsgEntityList.observe(viewLifecycleOwner) {
adapter.refreshData(it)
}
override fun onStart() {
super.onStart()
activity?.run {
findNavController(
R.id.main_activity_middle_fragment
).navigate(R.id.CanvasFragment)
/**
* 照片view
*/
viewModel.liveDataPictureList.observe(viewLifecycleOwner){
pictureAdapter.refreshData(it)
}
//照片左右选择键点击监听
binding.notePictureLeft.setOnClickListener(this)
binding.notePictureRight.setOnClickListener(this)
binding.noteCamera.setOnClickListener(this)
//设置照片偏移量
val viewPager = binding.notePictureViewpager
val vto = viewPager.viewTreeObserver
vto.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
override fun onGlobalLayout() {
val width = viewPager.width
// 处理View宽度
// 在回调完成后需要将监听器从View树中移除以避免重复调用
viewPager.viewTreeObserver.removeOnGlobalLayoutListener(this)
val recyclerView = viewPager.getChildAt(0) as RecyclerView
recyclerView.setPadding(0, 0, width / 2 - 30, 0)
recyclerView.clipToPadding = false
}
})
binding.noteVoice.setOnTouchListener { _, event ->
Log.e("qj", event?.action.toString())
when (event?.action) {
MotionEvent.ACTION_DOWN -> {
voiceOnTouchStart()//Do Something
}
MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL, MotionEvent.ACTION_OUTSIDE -> {
voiceOnTouchStop()//Do Something
}
}
true
}
}
override fun onStop() {
super.onStop()
activity?.run {
findNavController(
R.id.main_activity_middle_fragment
).navigateUp()
private fun voiceOnTouchStart() {
viewModel.startSoundMetter(requireActivity(), binding.noteVoice)
}
private fun voiceOnTouchStop() {
Log.e("qj", "voiceOnTouchStop====${Constant.IS_VIDEO_SPEED}")
if (Constant.IS_VIDEO_SPEED) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
viewModel.stopSoundMeter()
}
}
}
private fun takePhoto() {
try {
val takePictureIntent = Intent(MediaStore.ACTION_IMAGE_CAPTURE)
if (takePictureIntent.resolveActivity(requireActivity().packageManager) != null) {
mCameraLauncher!!.launch(takePictureIntent)
}
} catch (e: Exception) {
Log.d("TTTT", e.toString())
}
}
override fun onDestroy() {
activity?.run {
val result = findNavController(R.id.main_activity_middle_fragment).navigateUp()
Log.e("qj","onStop===$result")
}
super.onDestroy()
}
override fun onClick(v: View) {
when (v) {
binding.notePictureLeft->{
val currentItem = binding.notePictureViewpager.currentItem
if (currentItem > 0) {
binding.notePictureViewpager.currentItem = currentItem - 1
} else {
return
}
}
binding.notePictureRight->{
val currentItem = binding.notePictureViewpager.currentItem
if (currentItem < pictureAdapter.data.size - 1) {
binding.notePictureViewpager.currentItem = currentItem + 1
} else {
return
}
}
binding.sketchEraser -> {
viewModel.onEraser()
binding.sketchEraser.isSelected = viewModel.isEraser
@ -125,6 +285,9 @@ class NoteFragment : BaseFragment(), View.OnClickListener {
mDialog.setNegativeButton("取消", null)
mDialog.show()
}
binding.noteCamera-> {
takePhoto()
}
}
}

View File

@ -1,18 +1,43 @@
package com.navinfo.omqs.ui.fragment.note
import android.app.Activity
import android.content.Context
import android.graphics.Bitmap
import android.graphics.drawable.AnimationDrawable
import android.graphics.drawable.BitmapDrawable
import android.os.Build
import android.view.Gravity
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.PopupWindow
import androidx.annotation.RequiresApi
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.blankj.utilcode.util.ToastUtils
import com.navinfo.collect.library.data.entity.AttachmentBean
import com.navinfo.collect.library.data.entity.NoteBean
import com.navinfo.collect.library.data.entity.QsRecordBean
import com.navinfo.collect.library.map.NIMapController
import com.navinfo.collect.library.utils.MapParamUtils
import com.navinfo.omqs.Constant
import com.navinfo.omqs.R
import com.navinfo.omqs.bean.ChatMsgEntity
import com.navinfo.omqs.db.RealmOperateHelper
import com.navinfo.omqs.ui.dialog.FirstDialog
import com.navinfo.omqs.util.DateTimeUtil
import com.navinfo.omqs.util.SoundMeter
import com.navinfo.omqs.util.SpeakMode
import dagger.hilt.android.lifecycle.HiltViewModel
import io.realm.Realm
import io.realm.RealmList
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import java.io.File
import java.io.FileOutputStream
import java.util.ArrayList
import java.util.UUID
import javax.inject.Inject
@HiltViewModel
@ -24,32 +49,40 @@ class NoteViewModel @Inject constructor(
lateinit var canvasView: CanvasView
var mNoteBean: NoteBean? = null
/**
* 要保存的评测数据
*/
val liveDataNoteBean = MutableLiveData(NoteBean(id = UUID.randomUUID().toString()))
/**
* 语音列表
*/
val listDataChatMsgEntityList = MutableLiveData<MutableList<ChatMsgEntity>>()
/**
* 照片列表
*/
val liveDataPictureList = MutableLiveData<MutableList<String>>()
var isEraser = false
var noteBeanDescription = ""
// /**
// * 橡皮擦开关
// */
// val liveEraserData = MutableLiveData(false)
//
// /**
// * 清除按钮
// */
// val liveClearData = MutableLiveData(false)
//
// /**
// * 回退按钮
// */
// val liveBackData = MutableLiveData(false)
//
// /**
// * 撤销按钮
// */
// val liveForward = MutableLiveData(false)
//语音窗体
private var pop: PopupWindow? = null
private var mSpeakMode: SpeakMode? = null
var oldBean: NoteBean? = null
//录音图标
var volume: ImageView? = null
var mSoundMeter: SoundMeter? = null
/**
* toast信息
*/
val liveDataToastMessage = MutableLiveData<String>()
/**
* 处理结束关闭fragment
*/
@ -105,21 +138,21 @@ class NoteViewModel @Inject constructor(
fun onSaveData() {
viewModelScope.launch(Dispatchers.IO) {
if (canvasView.paths != null && canvasView.paths!!.isNotEmpty()) {
var noteBean =
CanvasViewHelper.createNoteBean(mapController, canvasView.paths!!)
if (mNoteBean != null) {
noteBean.id = mNoteBean!!.id
noteBean.description = noteBeanDescription
}
noteBean.taskId = MapParamUtils.getTaskId()
mNoteBean = noteBean
var noteBean = CanvasViewHelper.createNoteBean(mapController, canvasView.paths!!)
liveDataNoteBean.value!!.taskId = MapParamUtils.getTaskId()
liveDataNoteBean.value!!.list = noteBean.list
liveDataNoteBean.value!!.description = noteBeanDescription
liveDataNoteBean.value!!.guideGeometry = noteBean.guideGeometry
val realm = realmOperateHelper.getRealmDefaultInstance()
realm.executeTransaction {
it.copyToRealmOrUpdate(noteBean)
it.copyToRealmOrUpdate(liveDataNoteBean.value)
}
mapController.markerHandle.addOrUpdateNoteMark(mNoteBean!!)
mapController.markerHandle.addOrUpdateNoteMark(liveDataNoteBean.value!!)
liveDataFinish.postValue(true)
realm.refresh()
realm.close()
}else{
liveDataToastMessage.postValue("请绘制内容!")
}
}
}
@ -128,7 +161,7 @@ class NoteViewModel @Inject constructor(
* 删除数据
*/
fun deleteData(context: Context) {
if (mNoteBean == null) {
if (liveDataNoteBean.value == null) {
liveDataFinish.postValue(true)
return
} else {
@ -143,10 +176,10 @@ class NoteViewModel @Inject constructor(
val realm = realmOperateHelper.getRealmDefaultInstance()
realm.executeTransaction {
val objects = it.where(NoteBean::class.java)
.equalTo("id", mNoteBean!!.id).findFirst()
.equalTo("id", liveDataNoteBean.value!!.id).findFirst()
objects?.deleteFromRealm()
}
mapController.markerHandle.removeNoteMark(mNoteBean!!)
mapController.markerHandle.removeNoteMark(liveDataNoteBean.value!!)
liveDataFinish.postValue(true)
realm.close()
}
@ -159,20 +192,200 @@ class NoteViewModel @Inject constructor(
/**
* 初始化数据
*/
@RequiresApi(Build.VERSION_CODES.N)
fun initData(id: String) {
viewModelScope.launch(Dispatchers.IO) {
val realm = realmOperateHelper.getRealmDefaultInstance()
realm.executeTransaction { it ->
val objects = it.where(NoteBean::class.java)
.equalTo("id", id).findFirst()
mNoteBean = realm.copyFromRealm(objects)
mNoteBean?.let { bean ->
noteBeanDescription = bean.description
val list = CanvasViewHelper.createDrawPaths(mapController, bean)
canvasView.setDrawPathList(list)
if(objects!=null){
oldBean = realm.copyFromRealm(objects)
oldBean?.let {
noteBeanDescription = it.description
liveDataNoteBean.postValue(it.copy())
val list = CanvasViewHelper.createDrawPaths(mapController, it)
canvasView.setDrawPathList(list)
liveDataNoteBean.value?.attachmentBeanList = it.attachmentBeanList
}
}
}
// 显示语音数据到界面
getChatMsgEntityList()
realm.close()
}
}
fun startSoundMetter(activity: Activity, v: View) {
if (mSpeakMode == null) {
mSpeakMode = SpeakMode(activity)
}
//语音识别动画
if (pop == null) {
pop = PopupWindow()
pop!!.width = ViewGroup.LayoutParams.MATCH_PARENT
pop!!.height = ViewGroup.LayoutParams.WRAP_CONTENT
pop!!.setBackgroundDrawable(BitmapDrawable())
val view =
View.inflate(activity as Context, R.layout.cv_card_voice_rcd_hint_window, null)
pop!!.contentView = view
volume = view.findViewById(R.id.volume)
}
pop!!.update()
Constant.IS_VIDEO_SPEED = true
//录音动画
if (pop != null) {
pop!!.showAtLocation(v, Gravity.CENTER, 0, 0)
}
volume!!.setBackgroundResource(R.drawable.pop_voice_img)
val animation = volume!!.background as AnimationDrawable
animation.start()
val name: String = DateTimeUtil.getTimeSSS().toString() + ".m4a"
if (mSoundMeter == null) {
mSoundMeter = SoundMeter()
}
mSoundMeter!!.setmListener(object : SoundMeter.OnSoundMeterListener {
@RequiresApi(Build.VERSION_CODES.Q)
override fun onSuccess(filePath: String?) {
filePath?.let {
val file = File(it)
if (file.exists() && file.length() < 1600) {
ToastUtils.showLong("语音时间太短,无效!")
mSpeakMode!!.speakText("语音时间太短,无效")
stopSoundMeter()
return
}
}
mSpeakMode!!.speakText("结束录音")
addChatMsgEntity(filePath!!)
}
@RequiresApi(api = Build.VERSION_CODES.Q)
override fun onfaild(message: String?) {
ToastUtils.showLong("录制失败!")
mSpeakMode!!.speakText("录制失败")
stopSoundMeter()
}
})
mSoundMeter!!.start(Constant.USER_DATA_ATTACHEMNT_PATH + name)
ToastUtils.showLong("开始录音")
mSpeakMode!!.speakText("开始录音")
}
//停止语音录制
@RequiresApi(api = Build.VERSION_CODES.Q)
fun stopSoundMeter() {
//先重置标识,防止按钮抬起时触发语音结束
Constant.IS_VIDEO_SPEED = false
if (mSoundMeter != null && mSoundMeter!!.isStartSound) {
mSoundMeter!!.stop()
}
pop?.let {
if (it.isShowing) {
it.dismiss()
}
}
}
fun savePhoto(bitmap: Bitmap) {
viewModelScope.launch(Dispatchers.IO) {
// 创建一个名为 "MyApp" 的文件夹
val myAppDir = File(Constant.USER_DATA_ATTACHEMNT_PATH)
if (!myAppDir.exists()) myAppDir.mkdirs() // 确保文件夹已创建
// 创建一个名为 fileName 的文件
val file = File(myAppDir, "${UUID.randomUUID()}.png")
file.createNewFile() // 创建文件
// 将 Bitmap 压缩为 JPEG 格式,并将其写入文件中
val out = FileOutputStream(file)
bitmap.compress(Bitmap.CompressFormat.JPEG, 90, out)
out.flush()
out.close()
val picList = mutableListOf<String>()
if (liveDataPictureList.value == null) {
picList.add(file.name)
} else {
picList.addAll(liveDataPictureList.value!!)
picList.add(file.name)
}
var attachmentList: RealmList<AttachmentBean> = RealmList()
//赋值处理
if (liveDataNoteBean.value?.attachmentBeanList?.isEmpty() == false) {
attachmentList = liveDataNoteBean.value?.attachmentBeanList!!
}
val attachmentBean = AttachmentBean()
attachmentBean.name = file.name!!
attachmentBean.type = 2
attachmentList.add(attachmentBean)
liveDataNoteBean.value?.attachmentBeanList = attachmentList
liveDataPictureList.postValue(picList)
}
}
/**
* 多媒体列表
*/
private suspend fun getChatMsgEntityList() {
val chatMsgEntityList: MutableList<ChatMsgEntity> = ArrayList()
val pictureList: MutableList<String> = ArrayList()
liveDataNoteBean.value?.attachmentBeanList?.forEach {
//1 录音
if (it.type == 1) {
val chatMsgEntity = ChatMsgEntity()
chatMsgEntity.name = it.name
chatMsgEntity.voiceUri = Constant.USER_DATA_ATTACHEMNT_PATH
chatMsgEntityList.add(chatMsgEntity)
}else if(it.type==2){
pictureList.add(it.name)
}
}
listDataChatMsgEntityList.postValue(chatMsgEntityList)
liveDataPictureList.postValue(pictureList)
}
fun addChatMsgEntity(filePath: String) {
if (filePath.isNotEmpty()) {
var chatMsgEntityList: MutableList<ChatMsgEntity> = ArrayList()
if (listDataChatMsgEntityList.value?.isEmpty() == false) {
chatMsgEntityList = listDataChatMsgEntityList.value!!
}
val chatMsgEntity = ChatMsgEntity()
chatMsgEntity.name = filePath.replace(Constant.USER_DATA_ATTACHEMNT_PATH, "").toString()
chatMsgEntity.voiceUri = Constant.USER_DATA_ATTACHEMNT_PATH
chatMsgEntityList.add(chatMsgEntity)
var attachmentList: RealmList<AttachmentBean> = RealmList()
//赋值处理
if (liveDataNoteBean.value?.attachmentBeanList?.isEmpty() == false) {
attachmentList = liveDataNoteBean.value?.attachmentBeanList!!
}
val attachmentBean = AttachmentBean()
attachmentBean.name = chatMsgEntity.name!!
attachmentBean.type = 1
attachmentList.add(attachmentBean)
liveDataNoteBean.value?.attachmentBeanList = attachmentList
listDataChatMsgEntityList.postValue(chatMsgEntityList)
}
}
}

View File

@ -105,6 +105,13 @@ class SignMoreInfoFragment : BaseFragment() {
}
else -> {
val adapter = SignUtil.getMoreInfoAdapter(it.renderEntity)
//增加详情为空不显示业务
if(adapter==null || adapter.data.isEmpty()){
activity?.run {
supportFragmentManager.beginTransaction().remove(this@SignMoreInfoFragment)
.commit()
}
}
binding.signInfoRecyclerview.adapter = adapter
}
}

View File

@ -0,0 +1,943 @@
package com.navinfo.omqs.util;
//Download by http://www.codefans.net
import android.app.Activity;
import android.content.ContentResolver;
import android.content.Context;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.LinearGradient;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.PixelFormat;
import android.graphics.PorterDuff.Mode;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Shader.TileMode;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.media.ExifInterface;
import android.net.Uri;
import android.util.Log;
import android.view.Display;
import android.view.WindowManager;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
/**
* Tools for handler picture
*
* @author Ryan.Tang
*
*/
public final class ImageLoad {
static Bitmap bitmap = null;
Context con;
public ImageLoad(Context con){
this.con=con;
}
/**
* Transfer drawable to bitmap
*
* @param drawable
* @return
*/
public static Bitmap drawableToBitmap(Drawable drawable) {
int w = drawable.getIntrinsicWidth();
int h = drawable.getIntrinsicHeight();
Config config = drawable.getOpacity() != PixelFormat.OPAQUE ? Config.ARGB_8888
: Config.RGB_565;
Bitmap bitmap = Bitmap.createBitmap(w, h, config);
Canvas canvas = new Canvas(bitmap);
drawable.setBounds(0, 0, w, h);
drawable.draw(canvas);
return bitmap;
}
/**
* Bitmap to drawable
*
* @param bitmap
* @return
*/
public static Drawable bitmapToDrawable(Bitmap bitmap) {
return new BitmapDrawable(bitmap);
}
/**
* Input stream to bitmap
*
* @param inputStream
* @return
* @throws Exception
*/
public static Bitmap inputStreamToBitmap(InputStream inputStream)
throws Exception {
return BitmapFactory.decodeStream(inputStream);
}
/**
* Byte transfer to bitmap
*
* @param byteArray
* @return
*/
public static Bitmap byteToBitmap(byte[] byteArray) {
if (byteArray.length != 0) {
return BitmapFactory
.decodeByteArray(byteArray, 0, byteArray.length);
} else {
return null;
}
}
/**
* Byte transfer to drawable
*
* @param byteArray
* @return
*/
public static Drawable byteToDrawable(byte[] byteArray) {
ByteArrayInputStream ins = null;
if (byteArray != null) {
ins = new ByteArrayInputStream(byteArray);
}
return Drawable.createFromStream(ins, null);
}
/**
* Bitmap transfer to bytes
*
* @param byteArray
* @return
*/
public static byte[] bitmapToBytes(Bitmap bm) {
byte[] bytes = null;
if (bm != null) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
bm.compress(Bitmap.CompressFormat.PNG, 100, baos);
bytes = baos.toByteArray();
}
return bytes;
}
/**
* Drawable transfer to bytes
*
* @param drawable
* @return
*/
public static byte[] drawableToBytes(Drawable drawable) {
BitmapDrawable bitmapDrawable = (BitmapDrawable) drawable;
Bitmap bitmap = bitmapDrawable.getBitmap();
byte[] bytes = bitmapToBytes(bitmap);
;
return bytes;
}
/**
* Base64 to byte[] //
*/
// public static byte[] base64ToBytes(String base64) throws IOException {
// byte[] bytes = Base64.decode(base64);
// return bytes;
// }
//
// /**
// * Byte[] to base64
// */
// public static String bytesTobase64(byte[] bytes) {
// String base64 = Base64.encode(bytes);
// return base64;
// }
/**
* Create reflection images
*
* @param bitmap
* @return
*/
public static Bitmap createReflectionImageWithOrigin(Bitmap bitmap) {
final int reflectionGap = 4;
int w = bitmap.getWidth();
int h = bitmap.getHeight();
Matrix matrix = new Matrix();
matrix.preScale(1, -1);
Bitmap reflectionImage = Bitmap.createBitmap(bitmap, 0, h / 2, w,
h / 2, matrix, false);
Bitmap bitmapWithReflection = Bitmap.createBitmap(w, (h + h / 2),
Config.ARGB_8888);
Canvas canvas = new Canvas(bitmapWithReflection);
canvas.drawBitmap(bitmap, 0, 0, null);
Paint deafalutPaint = new Paint();
canvas.drawRect(0, h, w, h + reflectionGap, deafalutPaint);
canvas.drawBitmap(reflectionImage, 0, h + reflectionGap, null);
Paint paint = new Paint();
LinearGradient shader = new LinearGradient(0, bitmap.getHeight(), 0,
bitmapWithReflection.getHeight() + reflectionGap, 0x70ffffff,
0x00ffffff, TileMode.CLAMP);
paint.setShader(shader);
// Set the Transfer mode to be porter duff and destination in
paint.setXfermode(new PorterDuffXfermode(Mode.DST_IN));
// Draw a rectangle using the paint with our linear gradient
canvas.drawRect(0, h, w, bitmapWithReflection.getHeight()
+ reflectionGap, paint);
return bitmapWithReflection;
}
/**
* 圆角
*
* @param bitmap
* @param roundPx
* 5 10
* @return
*/
public static Bitmap getRoundedCornerBitmap(Bitmap bitmap, float roundPx) {
int w = bitmap.getWidth();
int h = bitmap.getHeight();
Bitmap output = Bitmap.createBitmap(w, h, Config.ARGB_8888);
Canvas canvas = new Canvas(output);
final int color = 0xff424242;
final Paint paint = new Paint();
final Rect rect = new Rect(0, 0, w, h);
final RectF rectF = new RectF(rect);
paint.setAntiAlias(true);
canvas.drawARGB(0, 0, 0, 0);
paint.setColor(color);
canvas.drawRoundRect(rectF, roundPx, roundPx, paint);
paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN));
canvas.drawBitmap(bitmap, rect, rect, paint);
return output;
}
/**
* Resize the bitmap
*
* @param bitmap
* @param width
* @param height
* @return
*/
public static Bitmap zoomBitmap(Bitmap bitmap, int width, int height) {
int w = bitmap.getWidth();
int h = bitmap.getHeight();
Matrix matrix = new Matrix();
float scaleWidth = ((float) width / w);
float scaleHeight = ((float) height / h);
matrix.postScale(scaleWidth, scaleHeight);
Bitmap newbmp = Bitmap.createBitmap(bitmap, 0, 0, w, h, matrix, true);
return newbmp;
}
public static Bitmap zoomBitmap(String cameraPath,int width,int height, int size) {
// 获取图片Exif
ExifInterface exif;
int degree = 0;
try {
exif = new ExifInterface(cameraPath);
// 获取指定tag的属性值
int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, -1);
if (orientation != -1) {
// We only recognize a subset of orientation tag values.
switch (orientation) {
case ExifInterface.ORIENTATION_NORMAL:
degree = 0 ;
break;
case ExifInterface.ORIENTATION_UNDEFINED:
degree = 0 ;
break;
case ExifInterface.ORIENTATION_ROTATE_90:
degree = 90;
break;
case ExifInterface.ORIENTATION_ROTATE_180:
degree = 180;
break;
case ExifInterface.ORIENTATION_ROTATE_270:
degree = 270;
break;
default:
degree = 90;
break;
}
}
} catch (IOException e) {
e.printStackTrace();
CMLog.writeLogtoFile("展示图片生成异常", "异常", e.toString());
}
try {
BitmapFactory.Options bmpFactoryOptions = new BitmapFactory.Options();
bmpFactoryOptions.inJustDecodeBounds = true;
bitmap = BitmapFactory.decodeFile(cameraPath,bmpFactoryOptions);//此时返回bm为空
bmpFactoryOptions.inJustDecodeBounds = false;
bmpFactoryOptions.inSampleSize = size;
int heightRatio = (int) Math.ceil(bmpFactoryOptions.outHeight/ (float) height);
int widthRatio = (int) Math.ceil(bmpFactoryOptions.outWidth/ (float) width);
if (heightRatio > 1 && widthRatio > 1) {
bmpFactoryOptions.inSampleSize = heightRatio < widthRatio ? heightRatio: widthRatio;
}
bmpFactoryOptions.inPreferredConfig = Config.ARGB_8888;//该模式是默认的,可不设
bmpFactoryOptions.inPurgeable = true;// 同时设置才会有效
bmpFactoryOptions.inInputShareable = true;//当系统内存不够时候图片自动被回收
if(bitmap!=null&&!bitmap.isRecycled())
bitmap.recycle();
bitmap=BitmapFactory.decodeFile(cameraPath, bmpFactoryOptions);
if (degree != 0 && bitmap != null) {
Matrix m = new Matrix();
m.setRotate(degree, (float) bitmap.getWidth() / 2,(float) bitmap.getHeight() / 2);
Bitmap b2 = Bitmap.createBitmap(bitmap, 0, 0,bitmap.getWidth(), bitmap.getHeight(), m, true);
if (bitmap != b2) {
bitmap.recycle();
bitmap = b2;
if(b2!=null&&b2.isRecycled())
b2.recycle();
}
}
} catch (OutOfMemoryError e) {
CMLog.writeLogtoFile("照片内存溢出", "异常", "创建展示图异常:OutOfMemoryError");
System.gc();
}
//new File(cameraPath).delete();
return bitmap;
}
public static Bitmap zoomBitmap(String cameraPath, int multiple) {
Bitmap bitmap = null;
BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize = multiple; // 图片宽高都为原来的二分之一即图片为原来的四分之一
// 获取图片Exif
ExifInterface exif;
int degree = 0;
try {
exif = new ExifInterface(cameraPath);
// 获取指定tag的属性值
int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, -1);
if (orientation != -1) {
// We only recognize a subset of orientation tag values.
switch (orientation) {
case ExifInterface.ORIENTATION_ROTATE_90:
degree = 90;
break;
case ExifInterface.ORIENTATION_ROTATE_180:
degree = 180;
break;
case ExifInterface.ORIENTATION_ROTATE_270:
degree = 270;
break;
/* default:
degree = 90;
break;
*/
}
}
} catch (IOException e) {
e.printStackTrace();
CMLog.writeLogtoFile("缩略图生成异常", "异常", e.toString());
}
try {
bitmap = ImageCrop(BitmapFactory.decodeFile(cameraPath, options));
if (degree != 0 && bitmap != null) {
Matrix m = new Matrix();
m.setRotate(degree, (float) bitmap.getWidth() / 2,(float) bitmap.getHeight() / 2);
Bitmap b2 = Bitmap.createBitmap(bitmap, 0, 0,
bitmap.getWidth(), bitmap.getHeight(), m, true);
if (bitmap != b2) {
bitmap.recycle();
bitmap = b2;
}
}
} catch (OutOfMemoryError e) {
CMLog.writeLogtoFile("照片内存溢出", "异常", "创建缩略图异常:OutOfMemoryError");
System.gc();
}
if (bitmap == null) {
}
return bitmap;
}
private static int getDegree(String filePath){
if(!new File(filePath).exists())
return 0;
ExifInterface exif;
int degree = 0;
try {
exif = new ExifInterface(filePath);
// 获取指定tag的属性值
int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, -1);
if (orientation != -1) {
// We only recognize a subset of orientation tag values.
switch (orientation) {
case ExifInterface.ORIENTATION_ROTATE_90:
degree = 90;
break;
case ExifInterface.ORIENTATION_ROTATE_180:
degree = 180;
break;
case ExifInterface.ORIENTATION_ROTATE_270:
degree = 270;
break;
/* default:
degree = 90;
break;
*/
}
}
} catch (IOException e) {
e.printStackTrace();
CMLog.writeLogtoFile("缩略图生成异常", "异常", e.toString());
}
return degree;
}
/**
* 按正方形裁切图片
*/
public static Bitmap ImageCrop(Bitmap bitmap) {
if(bitmap == null)
return null;
int w = bitmap.getWidth(); // 得到图片的宽
int h = bitmap.getHeight();
int wh = w > h ? h : w;// 裁切后所取的正方形区域边长
int retX = w > h ? (w - h) / 2 : 0;// 基于原图,取正方形左上角x坐标
int retY = w > h ? 0 : (h - w) / 2;
// 下面这句是关键
return Bitmap.createBitmap(bitmap, retX, retY, wh, wh, null, false);
}
public static Bitmap zoomBitmap(byte[] data, int multiple, int degrees) {
Bitmap bitmap = null;
BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize = multiple; // 图片宽高都为原来的二分之一即图片为原来的四分之一
try {
bitmap = BitmapFactory.decodeByteArray(data, 0, data.length,options);
if (degrees != 0 && bitmap != null) {
Matrix m = new Matrix();
m.setRotate(degrees, (float) bitmap.getWidth() / 2,
(float) bitmap.getHeight() / 2);
try {
Bitmap b2 = Bitmap.createBitmap(bitmap, 0, 0,
bitmap.getWidth(), bitmap.getHeight(), m, true);
if (bitmap != b2) {
bitmap.recycle();
bitmap = b2;
}
} catch (OutOfMemoryError ex) {
// We have no memory to rotate. Return the original bitmap.
}
}
} catch (OutOfMemoryError e) {
CMLog.writeLogtoFile("照片内存溢出", "异常", "创建缩略图异常:OutOfMemoryError");
System.gc();
}
if (bitmap == null) {
}
return bitmap;
}
/**
* Resize the drawable
*
* @param drawable
* @param w
* @param h
* @return
*/
public static Drawable zoomDrawable(Drawable drawable, int w, int h) {
int width = drawable.getIntrinsicWidth();
int height = drawable.getIntrinsicHeight();
Bitmap oldbmp = drawableToBitmap(drawable);
Matrix matrix = new Matrix();
float sx = ((float) w / width);
float sy = ((float) h / height);
matrix.postScale(sx, sy);
Bitmap newbmp = Bitmap.createBitmap(oldbmp, 0, 0, width, height,
matrix, true);
return new BitmapDrawable(newbmp);
}
/**
* Get images from SD card by path and the name of image
*
* @param photoName
* @return
*/
public static Bitmap getPhotoFromSDCard(String path, String photoName) {
Bitmap photoBitmap = BitmapFactory.decodeFile(path + "/" + photoName
+ ".png");
if (photoBitmap == null) {
return null;
} else {
return photoBitmap;
}
}
/**
* Check the SD card
*
* @return
*/
public static boolean checkSDCardAvailable() {
return android.os.Environment.getExternalStorageState().equals(
android.os.Environment.MEDIA_MOUNTED);
}
/**
* Get image from SD card by path and the name of image
*
* @param photoName
* @return
*/
public static boolean findPhotoFromSDCard(String path, String photoName) {
boolean flag = false;
if (checkSDCardAvailable()) {
File dir = new File(path);
if (dir.exists()) {
File folders = new File(path);
File photoFile[] = folders.listFiles();
for (int i = 0; i < photoFile.length; i++) {
String fileName = photoFile[i].getName().split("\\.")[0];
if (fileName.equals(photoName)) {
flag = true;
}
}
} else {
flag = false;
}
// File file = new File(path + "/" + photoName + ".jpg" );
// if (file.exists()) {
// flag = true;
// }else {
// flag = false;
// }
} else {
flag = false;
}
return flag;
}
/**
* Save image to the SD card
*
* @param photoBitmap
* @param photoName
* @param path
*/
public static void savePhotoToSDCard(Bitmap photoBitmap, String path,
String photoName) {
if (checkSDCardAvailable()) {
File dir = new File(path);
if (!dir.exists()) {
dir.mkdirs();
}
File photoFile = new File(path, photoName + ".png");
FileOutputStream fileOutputStream = null;
try {
fileOutputStream = new FileOutputStream(photoFile);
if (photoBitmap != null) {
if (photoBitmap.compress(Bitmap.CompressFormat.PNG, 100,
fileOutputStream)) {
fileOutputStream.flush();
// fileOutputStream.close();
}
}
} catch (FileNotFoundException e) {
photoFile.delete();
e.printStackTrace();
} catch (IOException e) {
photoFile.delete();
e.printStackTrace();
} finally {
try {
fileOutputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
/**
* Delete the image from SD card
*
* @param path
* file:///sdcard/temp.jpg
*/
public static void deleteAllPhoto(String path) {
if (checkSDCardAvailable()) {
File folder = new File(path);
File[] files = folder.listFiles();
for (int i = 0; i < files.length; i++) {
files[i].delete();
}
}
}
public static void deletePhotoAtPathAndName(String path, String fileName) {
if (checkSDCardAvailable()) {
File folder = new File(path);
File[] files = folder.listFiles();
for (int i = 0; i < files.length; i++) {
System.out.println(files[i].getName());
if (files[i].getName().equals(fileName)) {
files[i].delete();
}
}
}
}
public Bitmap setImage(Uri mImageCaptureUri) {
// 不管是拍照还是选择图片每张图片都有在数据中存储也存储有对应旋转角度orientation值
// 所以我们在取出图片是把角度值取出以便能正确的显示图片,没有旋转时的效果观看
ContentResolver cr = con.getContentResolver();
Cursor cursor = cr.query(mImageCaptureUri, null, null, null, null);// 根据Uri从数据库中找
if (cursor != null) {
cursor.moveToFirst();// 把游标移动到首位因为这里的Uri是包含ID的所以是唯一的不需要循环找指向第一个就是了
String filePath = cursor.getString(cursor.getColumnIndex("_data"));// 获取图片路
String orientation = cursor.getString(cursor
.getColumnIndex("orientation"));// 获取旋转的角度
cursor.close();
if (filePath != null) {
Bitmap bitmap = BitmapFactory.decodeFile(filePath);// 根据Path读取资源图片
int angle = 0;
if (orientation != null && !"".equals(orientation)) {
angle = Integer.parseInt(orientation);
}
if (angle != 0) {
// 下面的方法主要作用是把图片转一个角度也可以放大缩小等
Matrix m = new Matrix();
int width = bitmap.getWidth();
int height = bitmap.getHeight();
m.setRotate(angle); // 旋转angle度
bitmap = Bitmap.createBitmap(bitmap, 0, 0, width, height,
m, true);// 从新生成图片
}
// photo.setImageBitmap(bitmap);
return bitmap;
}
}
return null;
}
/**
* 读取图片属性旋转的角度
*
* @param path
* 图片绝对路径
* @return degree旋转的角度
*/
public static int readPictureDegree(String path) {
int degree = 0;
try {
ExifInterface exifInterface = new ExifInterface(path);
int orientation = exifInterface.getAttributeInt(
ExifInterface.TAG_ORIENTATION, -1);
switch (orientation) {
case ExifInterface.ORIENTATION_ROTATE_90:
degree = 90;
break;
case ExifInterface.ORIENTATION_ROTATE_180:
degree = 180;
break;
case ExifInterface.ORIENTATION_ROTATE_270:
degree = 270;
break;
}
Log.i("ImageTools", "获取拍照角度:" + degree);
} catch (IOException e) {
e.printStackTrace();
Log.i("ImageTools", "获取拍照角度异常:" + e.getMessage());
}
return degree;
}
/*
* 旋转图片
*
* @param angle
*
* @param bitmap
*
* @return Bitmap
*/
public static Bitmap rotaingImageView(int angle, Bitmap bitmap) {
// 旋转图片 动作
Matrix matrix = new Matrix();
matrix.postRotate(angle);
System.out.println("angle2=" + angle);
if (bitmap != null) {
// 创建新的图片
Bitmap resizedBitmap = Bitmap.createBitmap(bitmap, 0, 0,
bitmap.getWidth(), bitmap.getHeight(), matrix, true);
return resizedBitmap;
}
return null;
}
/*
* 旋转图片
*
* @param bitmap
*
* @param filePath
*
* @return Bitmap
*/
public static void saveBitmap(Bitmap bitmap, String filePath) {
File f = new File(filePath);
if (f.exists()) {
f.delete();
}
try {
FileOutputStream out = new FileOutputStream(f);
bitmap.compress(Bitmap.CompressFormat.JPEG, 90, out);
out.flush();
out.close();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
CMLog.writeLogtoFile("照片生成", "拍照", "重新生成照片异常FileNotFoundException"
+ e.getMessage());
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
CMLog.writeLogtoFile("照片生成", "拍照", "重新生成照片IO异常" + e.getMessage());
}
}
/*
* 释放Bitmap
*
* @param bitmap
*/
public static void recycleBitmap(Bitmap bitmap) {
if (bitmap != null && !bitmap.isRecycled()) {
// 回收并且置为null
bitmap.recycle();
bitmap = null;
}
System.gc();
}
/*
* 创建缩略图
*
* @param filePath
*
* @return Bitmap
*/
public static Bitmap createZoominBitmap(String filePath) {
Bitmap bitmap = null;
try {
// 实例化Bitmap
bitmap = BitmapFactory.decodeFile(filePath);
} catch (OutOfMemoryError e) {
//
}
return bitmap;
}
public static Bitmap getBitmapLittle(Context context, String absolutePath) {
BitmapFactory.Options opt = new BitmapFactory.Options();
// 这个isjustdecodebounds很重要
opt.inJustDecodeBounds = true;
Bitmap bm = BitmapFactory.decodeFile(absolutePath, opt);
// 获取到这个图片的原始宽度和高度
int picWidth = opt.outWidth;
int picHeight = opt.outHeight;
// 获取屏的宽度和高度
WindowManager windowManager = ((Activity)context).getWindowManager();
Display display = windowManager.getDefaultDisplay();
int screenWidth = display.getWidth();
int screenHeight = display.getHeight();
// isSampleSize是表示对图片的缩放程度比如值为2图片的宽度和高度都变为以前的1/2
opt.inSampleSize = 1;
// 根据屏的大小和图片大小计算出缩放比例
if (picWidth > picHeight) {
if (picWidth > screenWidth)
opt.inSampleSize = picWidth / screenWidth;
} else {
if (picHeight > screenHeight)
opt.inSampleSize = picHeight / screenHeight;
}
// 这次再真正地生成一个有像素的经过缩放了的bitmap
opt.inJustDecodeBounds = false;
bm = BitmapFactory.decodeFile(absolutePath, opt);
return bm;
}
/**
* 计算压缩比例值
* @param options 解析图片的配置信息
* @param reqWidth 所需图片压缩尺寸最小宽度
* @param reqHeight 所需图片压缩尺寸最小高度
* @return
*/
public static int calculateInSampleSize(BitmapFactory.Options options,
int reqWidth, int reqHeight) {
// 保存图片原宽高值
final int height = options. outHeight;
final int width = options. outWidth;
// 初始化压缩比例为1
int inSampleSize = 1;
// 当图片宽高值任何一个大于所需压缩图片宽高值时,进入循环计算系统
if (height > reqHeight || width > reqWidth) {
final int halfHeight = height / 2;
final int halfWidth = width / 2;
// 压缩比例值每次循环两倍增加,
// 直到原图宽高值的一半除以压缩值后都~大于所需宽高值为止
while ((halfHeight / inSampleSize) >= reqHeight
&& (halfWidth / inSampleSize) >= reqWidth) {
inSampleSize *= 2;
}
}
return inSampleSize;
}
/*public static void loadImage(int resid, String url, final ImageView imageView){
final String tmpUrl = url;
DisplayImageOptions options = new DisplayImageOptions.Builder()
.showImageOnLoading(resid)
.showImageForEmptyUri(resid)
.showImageOnFail(resid)
.cacheInMemory(true)
.cacheOnDisc(true)
.bitmapConfig(Bitmap.Config.ARGB_8888)
.build();
ImageLoader.getInstance().displayImage(tmpUrl, imageView, options,
new ImageLoadingListener() {
@Override
public void onLoadingStarted(String arg0, View arg1) {
// TODO Auto-generated method stub
}
@Override
public void onLoadingFailed(String arg0, View arg1,
FailReason arg2) {
// TODO Auto-generated method stub
}
@Override
public void onLoadingComplete(String arg0, View arg1,
Bitmap bmp) {
// TODO Auto-generated method stub
if (bmp == null)
return;
if( ((BaseZoomImageView)arg1).isDestroyed() ){
bmp.recycle();
return;
}
String path = ((PictureInfor)arg1.getTag()).mFilePath;
int degree = getDegree(path);
try {
if (degree != 0 && bmp != null&&!bmp.isRecycled()) {
Matrix m = new Matrix();
m.setRotate(degree, (float) bmp.getWidth() / 2,(float) bmp.getHeight() / 2);
Bitmap b2 = Bitmap.createBitmap(bmp, 0, 0,
bmp.getWidth(), bmp.getHeight(), m, true);
if (bmp != b2) {
bmp.recycle();
bmp = b2;
}
}
} catch (OutOfMemoryError e) {
CMLog.writeLogtoFile("照片内存溢出", "异常", "创建缩略图异常:OutOfMemoryError");
System.gc();
}
((BaseZoomImageView)arg1).setImageBitmap(bmp);
((BaseZoomImageView)arg1).setImageDrawable(null);
if(new File(path).exists())
return;
saveBitmap(bmp, path);
}
@Override
public void onLoadingCancelled(String arg0, View arg1) {
// TODO Auto-generated method stub
}
});
}*/
}

File diff suppressed because it is too large Load Diff

View File

@ -108,10 +108,10 @@ class SignUtil {
}
}
//物理车道数OMDB_PHY_LANENUM
DataCodeEnum.OMDB_LANE_NUM.code,
/* DataCodeEnum.OMDB_LANE_NUM.code,
DataCodeEnum.OMDB_PHY_LANENUM.code -> {
"${data.properties["laneS2e"]}|${data.properties["laneE2s"]}"
}
}*/
//常规点限速,条件点限速
DataCodeEnum.OMDB_SPEEDLIMIT.code, DataCodeEnum.OMDB_SPEEDLIMIT_COND.code -> getSpeedLimitMaxText(data)
@ -304,7 +304,7 @@ class SignUtil {
title = "逆方向车道数", text = "${data.properties["laneE2s"]}"
)
)
var str = when (data.properties["laneClass"]) {
/* var str = when (data.properties["laneClass"]) {
"0" -> "未赋值"
"1" -> "一条车道"
"2" -> "两或三条"
@ -317,7 +317,7 @@ class SignUtil {
TwoItemAdapterItem(
title = "车道数等级", text = str
)
)
)*/
}
//路口
DataCodeEnum.OMDB_INTERSECTION.code -> {
@ -833,16 +833,9 @@ class SignUtil {
else -> ""
}))
}
//路牙
DataCodeEnum.OMDB_OBJECT_CURB.code -> {
list.add(TwoItemAdapterItem(title = "是否符合高精地图", text = when (data.properties["compliant"]) {
"0" -> ""
"1" -> ""
else -> ""
}))
}
//平行墙
DataCodeEnum.OMDB_OBJECT_WALL.code -> {
list.add(TwoItemAdapterItem(title = "对象号码", text = "${data.properties["objectPid"]}"))
list.add(TwoItemAdapterItem(title = "类型", text = when (data.properties["type"]) {
"1" -> "隧道墙"
"3" -> "其他墙"
@ -851,6 +844,7 @@ class SignUtil {
}
//警示区
DataCodeEnum.OMDB_OBJECT_WARNING_AREA.code -> {
list.add(TwoItemAdapterItem(title = "对象号码", text = "${data.properties["objectPid"]}"))
list.add(TwoItemAdapterItem(title = "颜色", text = when (data.properties["color"]) {
"0" -> "未验证"
"1" -> "白色"
@ -1928,7 +1922,7 @@ class SignUtil {
*/
fun getRoadInfoIndex(element: RenderEntity): Int {
return when (element.code) {
DataCodeEnum.OMDB_PHY_LANENUM.code,//物理车道数
//DataCodeEnum.OMDB_PHY_LANENUM.code,//物理车道数
DataCodeEnum.OMDB_LANE_NUM.code -> 0
DataCodeEnum.OMDB_RD_LINK_KIND.code -> 1
DataCodeEnum.OMDB_RD_LINK_FUNCTION_CLASS.code -> 2

View File

@ -3,9 +3,12 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/button"
android:layout_width="match_parent"
<ImageView
android:id="@+id/show_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name" />
android:src="@drawable/icon_camera_img"
android:layout_gravity="center_horizontal"/>
</FrameLayout>

View File

@ -1,8 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="fragment"
type="com.navinfo.omqs.ui.fragment.note.NoteFragment" />
<variable
name="viewModel"
type="com.navinfo.omqs.ui.fragment.note.NoteViewModel" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="@dimen/right_fragment_w"
android:layout_height="match_parent"
android:background="@drawable/shape_right_fragment_bg"
@ -221,4 +235,6 @@
app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toRightOf="@id/note_camera"
app:layout_constraintRight_toRightOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -64,7 +64,7 @@
<item
android:id="@+id/personal_center_menu_version"
android:icon="@drawable/ic_baseline_layers_24"
android:title="版本24QE1_V1.2.3_20231201_A" />
android:title="版本24QE1_V1.2.4_20231206_A" />
</group>
<group android:checkableBehavior="single">
<item android:title="小标题">

View File

@ -74,6 +74,7 @@ dependencies {
api 'androidx.constraintlayout:constraintlayout:2.1.4'
api 'androidx.navigation:navigation-fragment-ktx:2.5.3'
api 'androidx.navigation:navigation-ui-ktx:2.5.3'
implementation files('libs\\universal-image-loader-1.9.3.jar')
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'

Binary file not shown.

View File

@ -179,6 +179,13 @@
<!-- oneway -->
<style-symbol id="oneway" repeat="true" src="assets:symbols/oneway.svg" />
<!-- 护栏 -->
<style-symbol id="guardrail" gland="true" repeat="true" repeat-gap="10" repeat-start="1" symbol-width="24" symbol-height="10" src="assets:omdb/icon_2013_4_3.svg" />
<!-- 路牙 -->
<style-symbol id="curb" repeat="true" gland="true" repeat-gap="10" repeat-start="1" src="assets:omdb/icon_2013_3.svg" symbol-width="16" />
<!---->
<style-symbol id="wall" repeat="true" gland="true" repeat-gap="8" repeat-start="1" src="assets:omdb/icon_2013_5.svg" symbol-width="12" />
<!-- omdb -->
<style-line id="boundaryType" stipple-width="0.1" width="0.1" />
<style-line dasharray="1,1" id="s2e" repeat-gap="3" repeat-start="0" stroke="#14582c"
@ -1553,6 +1560,11 @@
<text use="road" size="16"></text>
</m>
<!-- 物理车道数 -->
<m v="OMDB_PHY_LANENUM">
<text use="road" size="12" ></text>
</m>
<!-- 车信 -->
<m v="OMDB_LANEINFO" >
<m k="symbol" v="true">
@ -1618,42 +1630,20 @@
</m>
</m>
<!-- 中央隔离带 -->
<m v="OMDB_LINK_MEDIAN">
<m k="medianSurface" v="0">
<area use="obj-area" stroke="#00000000" stroke-width="1" src="assets:omdb/icon_2071_0.svg"></area>
</m>
<m k="medianSurface" v="1">
<area use="obj-area" stroke="#00000000" stroke-width="1" src="assets:omdb/icon_2071_1.svg"></area>
</m>
<m k="medianSurface" v="2">
<area use="obj-area" stroke="#00000000" stroke-width="1" src="assets:omdb/icon_2071_2.svg"></area>
</m>
<m k="medianSurface" v="3">
<area use="obj-area" stroke="#ffffff" stroke-width="1" src="assets:omdb/icon_2071_0.svg"></area>
</m>
<m k="medianSurface" v="4">
<area use="obj-area" stroke="#ffffff" stroke-width="1" src="assets:omdb/icon_2071_1.svg"></area>
</m>
<m k="medianSurface" v="5">
<area use="obj-area" stroke="#ffffff" stroke-width="1" src="assets:omdb/icon_2071_2.svg"></area>
</m>
</m>
<!-- 道路边界类型 -->
<m v="OMDB_RDBOUND_BOUNDARYTYPE">
<outline-layer id="boundaryType" stroke="#8e44ad" width="0.1" />
<!--护栏-->
<m k="boundaryType" v="4">
<symbol repeat="true" repeat-gap="36" gland="true" repeat-start="5" src="assets:omdb/icon_2013_4.svg" symbol-width="56" symbol-height="56"></symbol>
<symbol use="guardrail" ></symbol>
</m>
<!--路牙-->
<m k="boundaryType" v="3">
<symbol repeat="true" repeat-gap="12" gland="true" repeat-start="0.01" src="assets:omdb/icon_2013_3.svg" symbol-width="16" symbol-height="10"></symbol>
<symbol use="curb" ></symbol>
</m>
<!---->
<m k="boundaryType" v="5">
<symbol repeat="true" gland="true" repeat-gap="12" repeat-start="0.01" src="assets:omdb/icon_2013_5.svg" symbol-width="16" symbol-height="10"></symbol>
<symbol use="wall"></symbol>
</m>
<!--铺设路面边缘-->
<m k="boundaryType" v="6">
@ -1672,15 +1662,15 @@
<!--护栏-->
<m k="boundaryType" v="4">
<symbol repeat="true" repeat-gap="36" gland="true" repeat-start="5" src="assets:omdb/icon_2013_4.svg" symbol-width="56" symbol-height="56"></symbol>
<symbol use="guardrail" ></symbol>
</m>
<!--路牙-->
<m k="boundaryType" v="3">
<symbol repeat="true" gland="true" repeat-gap="12" repeat-start="0.01" src="assets:omdb/icon_2013_3.svg" symbol-width="16" symbol-height="10"></symbol>
<symbol use="curb" ></symbol>
</m>
<!---->
<m k="boundaryType" v="5">
<symbol repeat="true" gland="true" repeat-gap="12" repeat-start="0.01" src="assets:omdb/icon_2013_5.svg" symbol-width="16" symbol-height="10"></symbol>
<symbol use="wall"></symbol>
</m>
<!--铺设路面边缘-->
<m k="boundaryType" v="6">
@ -1787,21 +1777,49 @@
<!-- 路牙 -->
<m v="OMDB_OBJECT_CURB">
<symbol repeat="true" gland="true" repeat-gap="12" repeat-start="0.01" src="assets:omdb/icon_2013_3.svg" symbol-width="16" symbol-height="10"></symbol>
<symbol use="curb" ></symbol>
</m>
<!-- 护栏 -->
<m v="OMDB_OBJECT_BARRIER">
<symbol repeat="true" repeat-gap="36" gland="true" repeat-start="5" src="assets:omdb/icon_2013_4.svg" symbol-width="56" symbol-height="56"></symbol>
<symbol use="guardrail" ></symbol>
</m>
<!-- 平行墙 -->
<m v="OMDB_OBJECT_WALL">
<m k="type" v="-|1">
<symbol repeat="true" gland="true" repeat-gap="12" repeat-start="0.01" src="assets:omdb/icon_3010_0.svg" symbol-width="16" symbol-height="10"></symbol>
<symbol repeat="true" gland="true" repeat-gap="12" repeat-start="1" src="assets:omdb/icon_3010_0.svg" symbol-width="16" symbol-height="10"></symbol>
</m>
<m k="type" v="1">
<symbol repeat="true" gland="true" repeat-gap="12" repeat-start="0.01" src="assets:omdb/icon_3010_1.svg" symbol-width="16" symbol-height="10"></symbol>
<symbol repeat="true" gland="true" repeat-gap="12" repeat-start="1" src="assets:omdb/icon_3010_1.svg" symbol-width="16" symbol-height="10"></symbol>
</m>
</m>
<!-- 中央隔离带 -->
<m v="OMDB_LINK_MEDIAN">
<m k="medianSurfaceGeometry" v="0">
<!--<line stroke="#889b86" width="0.6"/>-->
<area use="obj-area" hasDirect="true" stroke="#ffffff" stroke-width="1" src="assets:omdb/icon_2071_0.svg"></area>
</m>
<m k="medianSurfaceGeometry" v="1">
<!--<line stroke="#45aa04" width="0.6"/>-->
<area use="obj-area" hasDirect="true" stroke="#ffffff" stroke-width="1" src="assets:omdb/icon_2071_1.svg"></area>
</m>
<m k="medianSurfaceGeometry" v="2">
<!--<line stroke="#134c05" width="0.6"/>-->
<area use="obj-area" hasDirect="true" stroke="#ffffff" stroke-width="1" src="assets:omdb/icon_2071_2.svg"></area>
</m>
<m k="medianSurfaceGeometry" v="3">
<!--<line stroke="#889b86" width="0.6"/>-->
<area use="obj-area" hasDirect="true" stroke="#00ffdd" stroke-width="1" src="assets:omdb/icon_2071_0.svg"></area>
</m>
<m k="medianSurfaceGeometry" v="4">
<!--<line stroke="#45aa04" width="0.6"/>-->
<area use="obj-area" hasDirect="true" stroke="#00ffdd" stroke-width="1" src="assets:omdb/icon_2071_1.svg"></area>
</m>
<m k="medianSurfaceGeometry" v="5">
<!--<line stroke="#134c05" width="0.6"/>-->
<area use="obj-area" hasDirect="true" stroke="#00ffdd" stroke-width="1" src="assets:omdb/icon_2071_2.svg"></area>
</m>
</m>
@ -1960,7 +1978,22 @@
<!-- 设施分离 -->
<m v="OMDB_LINK_SEPARATION">
<symbol repeat="true" repeat-gap="18" gland="true" repeat-start="0" src="assets:omdb/icon_2070_0.svg" symbol-width="32" symbol-height="32"></symbol>
<m k="direct" v="0|1|2">
<m k="side" v="0">
<symbol repeat="true" gland="true" repeat-gap="11" repeat-start="1" symbol-width="18" symbol-height="18" src="assets:omdb/icon_2070_2.svg"/>
</m>
<m k="side" v="1">
<symbol repeat="true" degree="180" gland="true" repeat-gap="11" repeat-start="1" symbol-width="18" symbol-height="18" src="assets:omdb/icon_2070_2.svg"/>
</m>
</m>
<m k="direct" v="3">
<m k="side" v="1">
<symbol repeat="true" gland="true" repeat-gap="11" repeat-start="1" symbol-width="18" symbol-height="18" src="assets:omdb/icon_2070_2.svg"/>
</m>
<m k="side" v="0">
<symbol repeat="true" degree="180" gland="true" repeat-gap="11" repeat-start="1" symbol-width="18" symbol-height="18" src="assets:omdb/icon_2070_2.svg"/>
</m>
</m>
</m>
<!-- 停止位置 -->
@ -2032,13 +2065,10 @@
<!--可变点限速-->
<m v="OMDB_SPEEDLIMIT_VAR" >
<caption fill="#ffffff" k="ref" priority="0" size="12" stroke="#ffffff"
stroke-width="1.0"></caption>
<symbol src="assets:omdb/icon_4004_0.svg" symbol-height="38"
<symbol src="assets:omdb/icon_4004_0.png" symbol-height="38"
symbol-width="20"></symbol>
</m>
<!--交通灯-->
<m v="OMDB_TRAFFICLIGHT">
<caption dy="6" fill="#FF0000" k="name" priority="0" size="12" symbol-width="37"
@ -2168,19 +2198,6 @@
</m>
</m>
<!-- zLevel -->
<m v="OMDB_ZLEVEL">
<m k="type" v="zlevelLine">
<line stroke="#59feb8" width="0.2" />
</m>
<m k="type" v="zlevelName">
<caption k="name" fill="#000000" stroke="#f1fe59" size="12" priority="0" ></caption>
</m>
<m k="linkPid">
<circle radius="3" stroke="#000000" fill="#ffffff"></circle>
</m>
</m>
<!-- 车道类型 -->
<m v="OMDB_LANE_TYPE_ACCESS">
<m k="bike">
@ -2212,5 +2229,18 @@
<caption k="ref" priority="0" size="12" fill="#ff0000" stroke="#ffffff" stroke-width="1" dy="-13"></caption>
</m>
<!-- zLevel -->
<m v="OMDB_ZLEVEL">
<m k="type" v="zlevelLine">
<line stroke="#59feb8" width="0.5" />
</m>
<m k="type" v="zlevelName">
<caption k="name" fill="#000000" stroke="#f1fe59" size="12" priority="0" ></caption>
</m>
<m k="linkPid">
<circle radius="3" stroke="#000000" fill="#ffffff"></circle>
</m>
</m>
</m>
</rendertheme>

View File

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="b" xmlns="http://www.w3.org/2000/svg" width="100" height="100"
xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100">
<defs>
<style>
.k{fill:none;}.k,.l,.m,.n,.o,.p,.q,.r{stroke-width:0px;}.l{fill:url(#e);}.m{fill:url(#f);}.n{fill:url(#d);}.o{fill:url(#j);}.p{fill:url(#i);}.q{fill:url(#h);}.r{fill:url(#g);}
</style>
<linearGradient id="d" x1="88.8" y1="49.9" x2="91" y2="49.9" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#231815" />
<stop offset="0" stop-color="#372d2a" />
<stop offset="0" stop-color="#655d5b" />
<stop offset=".1" stop-color="#8e8987" />
<stop offset=".2" stop-color="#b1adac" />
<stop offset=".2" stop-color="#cdcbca" />
<stop offset=".3" stop-color="#e3e2e1" />
<stop offset=".3" stop-color="#f2f2f2" />
<stop offset=".4" stop-color="#fcfbfb" />
<stop offset=".5" stop-color="#fff" />
<stop offset=".7" stop-color="#fcfcfc" />
<stop offset=".7" stop-color="#f5f5f5" />
<stop offset=".8" stop-color="#e9e8e8" />
<stop offset=".8" stop-color="#d8d6d6" />
<stop offset=".9" stop-color="#c2bfbe" />
<stop offset=".9" stop-color="#a6a2a1" />
<stop offset=".9" stop-color="#85807e" />
<stop offset="1" stop-color="#605957" />
<stop offset="1" stop-color="#3a312f" />
<stop offset="1" stop-color="#453d3b" />
<stop offset="1" stop-color="#65605f" />
<stop offset="1" stop-color="#7f7c7b" />
<stop offset="1" stop-color="#91908f" />
<stop offset="1" stop-color="#9c9c9b" />
<stop offset="1" stop-color="#a0a0a0" />
</linearGradient>
<linearGradient id="e" x1="68.7" y1="49.9" x2="71" y2="49.9" xlink:href="#d" />
<linearGradient id="f" x1="28.6" y1="49.9" x2="30.8" y2="49.9" xlink:href="#d" />
<linearGradient id="g" x1="8.5" y1="49.9" x2="10.7" y2="49.9" xlink:href="#d" />
<linearGradient id="h" x1="-1250.2" y1="57.9" x2="-1244.5" y2="57.9"
gradientTransform="translate(1297.3 -39.3)" xlink:href="#d" />
<linearGradient id="i" x1="-1313" y1="57.9" x2="-1307.4" y2="57.9"
gradientTransform="translate(1360.2 23.6)" xlink:href="#d" />
<linearGradient id="j" x1="-1331.5" y1="-1287.4" x2="-1323.6" y2="-1287.4"
gradientTransform="translate(1377.5 1337.4)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#989898" />
<stop offset="0" stop-color="#a3a3a3" />
<stop offset=".1" stop-color="#c4c5c5" />
<stop offset=".2" stop-color="#d8d9d9" />
<stop offset=".3" stop-color="#e0e1e1" />
<stop offset=".4" stop-color="#dbdcdc" />
<stop offset=".5" stop-color="#cccece" />
<stop offset=".6" stop-color="#b5b6b7" />
<stop offset=".7" stop-color="#949697" />
<stop offset=".8" stop-color="#6a6c6f" />
<stop offset=".8" stop-color="#3f4246" />
<stop offset="1" stop-color="#404247" />
<stop offset="1" stop-color="#43434a" />
</linearGradient>
</defs>
<g id="c">
<rect class="k" width="100" height="100" />
<path class="n"
d="m89,18h1.8c.1,0,.2.1.2.2v63.6c0,0,0,.1-.1.1h-2.1s0,0,0,0V18.2c0-.1.1-.2.2-.2Z" />
<path class="l"
d="m68.9,18h1.8c.1,0,.2.1.2.2v63.6c0,0,0,.1-.1.1h-2.1s0,0,0,0V18.2c0-.1.1-.2.2-.2Z" />
<path class="m"
d="m28.8,18h1.8c.1,0,.2.1.2.2v63.6c0,0,0,.1-.1.1h-2.1s0,0,0,0V18.2c0-.1.1-.2.2-.2Z" />
<path class="r"
d="m8.7,18h1.8c.1,0,.2.1.2.2v63.6c0,0,0,.1-.1.1h-2.1s0,0,0,0V18.2c0-.1.1-.2.2-.2Z" />
<path class="q"
d="m47.4-31.4h5.2c.1,0,.2.1.2.2v99.7c0,0,0,.1-.1.1h-5.4s0,0,0,0V-31.2c0-.1.1-.2.2-.2Z"
transform="translate(31.4 68.6) rotate(-90)" />
<path class="p"
d="m47.4,31.4h5.2c.1,0,.2.1.2.2v99.7c0,0,0,.1-.1.1h-5.4s0,0,0,0V31.7c0-.1.1-.2.2-.2Z"
transform="translate(-31.4 131.4) rotate(-90)" />
<path class="o"
d="m46.5,0h6.5c.6,0,1.1.5,1.1,1.1v98c0,.5-.4,1-1,1h-6.8c-.5,0-.9-.4-.9-.9V1.1c0-.6.5-1.1,1.1-1.1Z"
transform="translate(99.5 100) rotate(180)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="b" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24">
<defs>
<style>
.k{fill:none;}.k,.l,.m,.n,.o,.p,.q,.r{stroke-width:0px;}.l{fill:url(#e);}.m{fill:url(#f);}.n{fill:url(#d);}.o{fill:url(#j);}.p{fill:url(#i);}.q{fill:url(#h);}.r{fill:url(#g);}
</style>
<linearGradient id="d" x1="21.1" y1="12" x2="22.1" y2="12" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#231815" />
<stop offset="0" stop-color="#372d2a" />
<stop offset="0" stop-color="#655d5b" />
<stop offset=".1" stop-color="#8e8987" />
<stop offset=".2" stop-color="#b1adac" />
<stop offset=".2" stop-color="#cdcbca" />
<stop offset=".3" stop-color="#e3e2e1" />
<stop offset=".3" stop-color="#f2f2f2" />
<stop offset=".4" stop-color="#fcfbfb" />
<stop offset=".5" stop-color="#fff" />
<stop offset=".7" stop-color="#fcfcfc" />
<stop offset=".7" stop-color="#f5f5f5" />
<stop offset=".8" stop-color="#e9e8e8" />
<stop offset=".8" stop-color="#d8d6d6" />
<stop offset=".9" stop-color="#c2bfbe" />
<stop offset=".9" stop-color="#a6a2a1" />
<stop offset=".9" stop-color="#85807e" />
<stop offset="1" stop-color="#605957" />
<stop offset="1" stop-color="#3a312f" />
<stop offset="1" stop-color="#453d3b" />
<stop offset="1" stop-color="#65605f" />
<stop offset="1" stop-color="#7f7c7b" />
<stop offset="1" stop-color="#91908f" />
<stop offset="1" stop-color="#9c9c9b" />
<stop offset="1" stop-color="#a0a0a0" />
</linearGradient>
<linearGradient id="e" x1="16.3" y1="12" x2="17.3" y2="12" xlink:href="#d" />
<linearGradient id="f" x1="6.6" y1="12" x2="7.6" y2="12" xlink:href="#d" />
<linearGradient id="g" x1="1.8" y1="12" x2="2.8" y2="12" xlink:href="#d" />
<linearGradient id="h" x1="-1310.2" y1="19.9" x2="-1308.2" y2="19.9"
gradientTransform="translate(1321.2 -15.4)" xlink:href="#d" />
<linearGradient id="i" x1="-1325.3" y1="19.9" x2="-1323.3" y2="19.9"
gradientTransform="translate(1336.3 -.3)" xlink:href="#d" />
<linearGradient id="j" x1="-1367.1" y1="-1325.4" x2="-1364.7" y2="-1325.4"
gradientTransform="translate(1377.9 1337.4)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#989898" />
<stop offset="0" stop-color="#a3a3a3" />
<stop offset=".1" stop-color="#c4c5c5" />
<stop offset=".2" stop-color="#d8d9d9" />
<stop offset=".3" stop-color="#e0e1e1" />
<stop offset=".4" stop-color="#dbdcdc" />
<stop offset=".5" stop-color="#cccece" />
<stop offset=".6" stop-color="#b5b6b7" />
<stop offset=".7" stop-color="#949697" />
<stop offset=".8" stop-color="#6a6c6f" />
<stop offset=".8" stop-color="#3f4246" />
<stop offset="1" stop-color="#404247" />
<stop offset="1" stop-color="#43434a" />
</linearGradient>
</defs>
<g id="c">
<rect class="k" width="24" height="24" />
<path class="n"
d="m21.3,4.3h.5c.1,0,.2.1.2.2v15c0,0,0,.1-.1.1h-.8s0,0,0,0V4.5c0-.1.1-.2.2-.2Z" />
<path class="l"
d="m16.5,4.3h.5c.1,0,.2.1.2.2v15c0,0,0,.1-.1.1h-.8s0,0,0,0V4.5c0-.1.1-.2.2-.2Z" />
<path class="m"
d="m6.9,4.3h.5c.1,0,.2.1.2.2v15c0,0,0,.1-.1.1h-.8s0,0,0,0V4.5c0-.1.1-.2.2-.2Z" />
<path class="r"
d="m2,4.3h.5c.1,0,.2.1.2.2v15c0,0,0,.1-.1.1h-.8s0,0,0,0V4.5c0-.1.1-.2.2-.2Z" />
<path class="q"
d="m11.2-7.5h1.5c.1,0,.2.1.2.2v23.7c0,0,0,.1-.1.1h-1.8s0,0,0,0V-7.3c0-.1.1-.2.2-.2Z"
transform="translate(7.5 16.5) rotate(-90)" />
<path class="p"
d="m11.2,7.5h1.5c.1,0,.2.1.2.2v23.7c0,0,0,.1-.1.1h-1.8s0,0,0,0V7.8c0-.1.1-.2.2-.2Z"
transform="translate(-7.5 31.5) rotate(-90)" />
<path class="o"
d="m11.2,0h1.5c.3,0,.5.2.5.5v23.1c0,.2-.2.4-.4.4h-1.8c-.2,0-.4-.2-.4-.4V.5c0-.3.2-.5.5-.5Z"
transform="translate(23.9 24) rotate(180)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="b" xmlns="http://www.w3.org/2000/svg" width="24.3" height="26.2"
xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24.3 26.2">
<defs>
<style>
.o{fill:none;}.o,.p,.q,.r,.s,.t,.u,.v,.w,.x,.y,.z{stroke-width:0px;}.p{fill:url(#e);}.q{fill:url(#f);}.r{fill:url(#d);}.s{fill:url(#j);}.t{fill:url(#i);}.u{fill:url(#h);}.v{fill:url(#m);}.w{fill:url(#g);}.x{fill:url(#k);}.y{fill:url(#n);}.z{fill:url(#l);}
</style>
<linearGradient id="d" x1="17.8" y1="11.7" x2="19.3" y2="11.7"
gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#231815" />
<stop offset="0" stop-color="#372d2a" />
<stop offset="0" stop-color="#655d5b" />
<stop offset=".1" stop-color="#8e8987" />
<stop offset=".2" stop-color="#b1adac" />
<stop offset=".2" stop-color="#cdcbca" />
<stop offset=".3" stop-color="#e3e2e1" />
<stop offset=".3" stop-color="#f2f2f2" />
<stop offset=".4" stop-color="#fcfbfb" />
<stop offset=".5" stop-color="#fff" />
<stop offset=".7" stop-color="#fcfcfc" />
<stop offset=".7" stop-color="#f5f5f5" />
<stop offset=".8" stop-color="#e9e8e8" />
<stop offset=".8" stop-color="#d8d6d6" />
<stop offset=".9" stop-color="#c2bfbe" />
<stop offset=".9" stop-color="#a6a2a1" />
<stop offset=".9" stop-color="#85807e" />
<stop offset="1" stop-color="#605957" />
<stop offset="1" stop-color="#3a312f" />
<stop offset="1" stop-color="#453d3b" />
<stop offset="1" stop-color="#65605f" />
<stop offset="1" stop-color="#7f7c7b" />
<stop offset="1" stop-color="#91908f" />
<stop offset="1" stop-color="#9c9c9b" />
<stop offset="1" stop-color="#a0a0a0" />
</linearGradient>
<linearGradient id="e" x1="4.7" x2="6.2" xlink:href="#d" />
<linearGradient id="f" x1="-1387.6" y1="84.4" x2="-1384.2" y2="84.4"
gradientTransform="translate(1397.9 -63.3)" xlink:href="#d" />
<linearGradient id="g" x1="-1491.7" y1="-1333.2" x2="-1489.4" y2="-1333.2"
gradientTransform="translate(1502.6 1357.6)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#989898" />
<stop offset="0" stop-color="#a3a3a3" />
<stop offset=".1" stop-color="#c4c5c5" />
<stop offset=".2" stop-color="#d8d9d9" />
<stop offset=".3" stop-color="#e0e1e1" />
<stop offset=".4" stop-color="#dbdcdc" />
<stop offset=".5" stop-color="#cccece" />
<stop offset=".6" stop-color="#b5b6b7" />
<stop offset=".7" stop-color="#949697" />
<stop offset=".8" stop-color="#6a6c6f" />
<stop offset=".8" stop-color="#3f4246" />
<stop offset="1" stop-color="#404247" />
<stop offset="1" stop-color="#43434a" />
</linearGradient>
<linearGradient id="h" x1="-4676.7" y1="-2786.2" x2="-4674.1" y2="-2786.2"
gradientTransform="translate(-2783.9 -4665.1) rotate(-90) scale(1 -1)"
gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#888" />
<stop offset="0" stop-color="#888" />
<stop offset="0" stop-color="#acacac" />
<stop offset="0" stop-color="#cacaca" />
<stop offset=".2" stop-color="#e1e1e1" />
<stop offset=".3" stop-color="#f2f2f2" />
<stop offset=".4" stop-color="#fbfbfb" />
<stop offset=".5" stop-color="#fff" />
<stop offset=".7" stop-color="#fcfcfc" />
<stop offset=".8" stop-color="#f5f5f5" />
<stop offset=".9" stop-color="#e8e8e8" />
<stop offset=".9" stop-color="#d6d6d7" />
<stop offset="1" stop-color="#bfbfc0" />
<stop offset="1" stop-color="#b4b4b5" />
</linearGradient>
<linearGradient id="i" y1="-2805.7" y2="-2805.7" xlink:href="#h" />
<linearGradient id="j" x1="15.1" y1="3.8" x2="16.6" y2="3.8"
gradientTransform="translate(-3.9 -3)" xlink:href="#d" />
<linearGradient id="k" x1="14.6" y1=".8" x2="16.1" y2=".8"
gradientTransform="translate(-6.4 .4)" xlink:href="#d" />
<linearGradient id="l" x1="13.3" y1="5.4" x2="14.8" y2="5.4"
gradientTransform="translate(.8 6.6) scale(1 -1)" xlink:href="#d" />
<linearGradient id="m" x1="13.7" y1="-2.1" x2="15.2" y2="-2.1"
gradientTransform="translate(-7.9 5.8) scale(1 1.3)" xlink:href="#d" />
<linearGradient id="n" x1="11.7" y1="-1" x2="13.2" y2="-1"
gradientTransform="translate(4.8 1.8) scale(1 -1.3)" xlink:href="#d" />
</defs>
<g id="c">
<rect class="o" y="2.2" width="24" height="24" />
<path class="r"
d="m18,4h1c.1,0,.2.1.2.2v15c0,0,0,.1-.1.1h-1.3s0,0,0,0V4.3c0-.1.1-.2.2-.2Z" />
<path class="p"
d="m4.9,4h1c.1,0,.2.1.2.2v15c0,0,0,.1-.1.1h-1.3s0,0,0,0V4.3c0-.1.1-.2.2-.2Z" />
<path class="q"
d="m10.5,9.1h3c.1,0,.2.1.2.2v23.7c0,0,0,.1-.1.1h-3.2s0,0,0,0V9.3c0-.1.1-.2.2-.2Z"
transform="translate(-9.1 33.1) rotate(-90)" />
<path class="w"
d="m11.2,22.5h1.5c.3,0,.5.2.5.5v2.8c0,.2-.2.4-.4.4h-1.8c-.2,0-.4-.2-.4-.4v-2.8c0-.3.2-.5.5-.5Z"
transform="translate(24 48.7) rotate(180)" />
<rect class="u" x="0" y="9" width="4.7" height="2.6" />
<rect class="t" x="19.3" y="9" width="5" height="2.6" />
<path class="s" d="m11.3-.8h1.3c0,0,.1,0,.1.1v3.1h-1.5V-.7c0,0,0-.1.1-.1Z"
transform="translate(11.1 12.6) rotate(-90)" />
<path class="x" d="m8.3-.4h1.3c0,0,.1,0,.1.1v3.1h-1.5V-.3c0,0,0-.1.1-.1Z"
transform="translate(10.3 10.2) rotate(-106.3)" />
<path class="z" d="m14.1-.4h1.5v3.1c0,0,0,.1-.1.1h-1.3c0,0-.1,0-.1-.1V-.4h0Z"
transform="translate(9.6 15.1) rotate(-73.7)" />
<path class="v" d="m5.9.9h1.3c0,0,.1,0,.1.1v4.1h-1.5V1c0,0,0-.1.1-.1Z"
transform="translate(9.8 9.5) rotate(-141.5)" />
<path class="y" d="m16.5,1h1.5v4.1c0,0,0,.1-.1.1h-1.3c0,0-.1,0-.1-.1V1h0Z"
transform="translate(2 11.7) rotate(-39.6)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@ -1 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><defs><style>.d{fill:#45aa04;stroke-width:0px;}</style></defs><g id="c"><rect class="d" width="18" height="18"/></g></svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg id="b" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
<defs>
<style>.d{fill:#45aa04;stroke-width:0px;}</style>
</defs>
<g id="c">
<rect class="d" width="18" height="18" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 250 B

After

Width:  |  Height:  |  Size: 291 B

View File

@ -1 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><defs><style>.d{fill:#134c05;stroke-width:0px;}</style></defs><g id="c"><rect class="d" width="18" height="18"/></g></svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg id="b" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
<defs>
<style>.d{fill:#134c05;stroke-width:0px;}</style>
</defs>
<g id="c">
<rect class="d" width="18" height="18" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 250 B

After

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -1 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" width="70" height="94" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 70 94"><defs><style>.h{fill:#a74d4b;opacity:.7;}.h,.i,.j,.k,.l,.m,.n{stroke-width:0px;}.h,.j{isolation:isolate;}.i{opacity:0;}.i,.o{fill:none;}.j{fill:#ff5f4c;opacity:.3;}.o{stroke:#db4646;stroke-dasharray:0 0 0 0 0 0 6.4 7.1;stroke-linecap:square;stroke-width:2.1px;}.k{fill:#2a23f5;}.l{fill:#fff;}.m{fill:url(#f);}.n{fill:url(#g);}</style><radialGradient id="f" cx="131.4" cy="284.8" fx="131.4" fy="284.8" r="1.3" gradientTransform="translate(-1182.6 -13193.2) rotate(38.1) scale(54 33.9) skewX(7.5)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ff9287"/><stop offset=".8" stop-color="#ff5f4c"/><stop offset="1" stop-color="#ff5f4c"/></radialGradient><radialGradient id="g" cx="128.9" cy="283.6" fx="128.9" fy="283.6" r=".5" gradientTransform="translate(-5048.6 -10839.4) scale(39.4 38.4)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#e75545"/><stop offset=".8" stop-color="#c4483b"/><stop offset="1" stop-color="#983b31"/></radialGradient></defs><g id="c"><ellipse id="d" class="j" cx="35.5" cy="84.1" rx="14.4" ry="3.7"/><ellipse id="e" class="h" cx="35.5" cy="84.1" rx="7.5" ry="3"/><path class="m" d="m26.7,71.1l-1.1-1c-9.6-4.2-15.6-13.4-15.4-23.6,0-14.1,11.2-25.5,25-25.5s25,11.4,25,25.5-6.5,19.8-15.6,23.6c-.3.3-.6.6-.9,1-3.4,3.9-6.2,8.3-8.3,13,0,0-3.6-7.8-8.9-13h.1Z"/><ellipse class="n" cx="35" cy="45.6" rx="19.8" ry="19.2"/><ellipse class="l" cx="35.2" cy="45.3" rx="20.1" ry="19.6"/><ellipse class="k" cx="35.2" cy="45.3" rx="17.2" ry="16.8"/><ellipse class="o" cx="35.2" cy="45.3" rx="18.3" ry="17.8"/><rect class="i" width="70" height="94"/></g></svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg id="b" xmlns="http://www.w3.org/2000/svg" width="70" height="94"
xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 70 94">
<defs>
<style>
.h{fill:#a74d4b;opacity:.7;}.h,.i,.j,.k,.l,.m,.n{stroke-width:0px;}.h,.j{isolation:isolate;}.i{opacity:0;}.i,.o{fill:none;}.j{fill:#ff5f4c;opacity:.3;}.o{stroke:#db4646;stroke-dasharray:0
0 0 0 0 0 6.4
7.1;stroke-linecap:square;stroke-width:2.1px;}.k{fill:#2a23f5;}.l{fill:#fff;}.m{fill:url(#f);}.n{fill:url(#g);}
</style>
<radialGradient id="f" cx="131.4" cy="284.8" fx="131.4" fy="284.8" r="1.3"
gradientTransform="translate(-1182.6 -13193.2) rotate(38.1) scale(54 33.9) skewX(7.5)"
gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#ff9287" />
<stop offset=".8" stop-color="#ff5f4c" />
<stop offset="1" stop-color="#ff5f4c" />
</radialGradient>
<radialGradient id="g" cx="128.9" cy="283.6" fx="128.9" fy="283.6" r=".5"
gradientTransform="translate(-5048.6 -10839.4) scale(39.4 38.4)"
gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#e75545" />
<stop offset=".8" stop-color="#c4483b" />
<stop offset="1" stop-color="#983b31" />
</radialGradient>
</defs>
<g id="c">
<ellipse id="d" class="j" cx="35.5" cy="84.1" rx="14.4" ry="3.7" />
<ellipse id="e" class="h" cx="35.5" cy="84.1" rx="7.5" ry="3" />
<path class="m"
d="m26.7,71.1l-1.1-1c-9.6-4.2-15.6-13.4-15.4-23.6,0-14.1,11.2-25.5,25-25.5s25,11.4,25,25.5-6.5,19.8-15.6,23.6c-.3.3-.6.6-.9,1-3.4,3.9-6.2,8.3-8.3,13,0,0-3.6-7.8-8.9-13h.1Z" />
<ellipse class="n" cx="35" cy="45.6" rx="19.8" ry="19.2" />
<ellipse class="l" cx="35.2" cy="45.3" rx="20.1" ry="19.6" />
<ellipse class="k" cx="35.2" cy="45.3" rx="17.2" ry="16.8" />
<ellipse class="o" cx="35.2" cy="45.3" rx="18.3" ry="17.8" />
<rect class="i" width="70" height="94" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -11,4 +11,16 @@ open class NoteBean @JvmOverloads constructor(
var description: String = "",
var taskId :Int = 0,
var list: RealmList<SketchAttachContent> = RealmList<SketchAttachContent>(),
) : RealmObject()
var attachmentBeanList: RealmList<AttachmentBean> = RealmList<AttachmentBean>(),
) : RealmObject(){
fun copy(): NoteBean {
return NoteBean(
taskId = taskId,
id = id,
guideGeometry = guideGeometry,
description = description,
list = list,
attachmentBeanList = attachmentBeanList
)
}
}

View File

@ -33,7 +33,7 @@ public enum class DataCodeEnum(var tableName: String,var tableSubName: String, v
OMDB_RAMP_7("高速直连出口匝道高速出入口匝道", "匝道","2037-7"),
OMDB_MULTI_DIGITIZED("上下线分离", "上下线分离","2040"),
OMDB_LANE_NUM("车道数", "车道数","2041"),
OMDB_PHY_LANENUM("物理车道数", "物理车道数","2097"),
OMDB_PHY_LANENUM("物理车道数", "物理车道数","2617"),
OMDB_VIADUCT("高架", "高架","2043"),
OMDB_LINK_SEPARATION("设施分离","设施分离", "2070"),
OMDB_LINK_MEDIAN("中央隔离带", "中央隔离带","2071"),