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

This commit is contained in:
squallzhjch 2023-09-27 14:49:22 +08:00
commit 9a4b4d2f58
36 changed files with 327 additions and 115 deletions

View File

@ -181,6 +181,23 @@
}
]
},
"3001":{
"table": "OMDB_OBJECT_OH_STRUCT",
"code": 3001,
"name": "上方障碍物",
"zoomMin": 15,
"zoomMax": 20,
"catch":true,
"checkLinkId": false,
"transformer": [
{
"k": "geometry",
"v": "~",
"klib": "geometry",
"vlib": "getPolygonCenterPoint()"
}
]
},
"3002":{
"table": "OMDB_OBJECT_TEXT",
"code": 3002,
@ -281,6 +298,15 @@
"catch":true,
"zoomMax": 20
},
"3027":{
"table": "OMDB_OBJECT_REFUGE_ISLAND",
"code": 3027,
"name": "路口内交通岛",
"catch":true,
"checkLinkId": false,
"zoomMin": 18,
"zoomMax": 20
},
"4001": {
"table": "OMDB_INTERSECTION",
"code": 4001,
@ -524,6 +550,7 @@
"table": "OMDB_LANE_LINK_LG",
"code": 5001,
"name": "车道中心线",
"catch":false,
"checkLinkId": false,
"zoomMin": 18,
"zoomMax": 20,

View File

@ -92,11 +92,6 @@ class Constant {
const val DEBUG = true
/**
* 地图最多缩放级别20
*/
const val MAX_ZOOM = 20
/**
* 是否自动定位
*/

View File

@ -6,7 +6,6 @@ import com.navinfo.collect.library.data.entity.RenderEntity
import com.navinfo.collect.library.utils.GeometryTools
import com.navinfo.omqs.Constant
import io.realm.Realm
import io.realm.RealmConfiguration
import org.json.JSONArray
import org.json.JSONObject
import org.locationtech.jts.algorithm.Angle
@ -583,9 +582,9 @@ class ImportPreProcess {
angleReference.renderEntityId = renderEntity.id
angleReference.name = "${renderEntity.name}车道中线面"
angleReference.table = renderEntity.table
angleReference.geometry = renderEntity.geometry
angleReference.geometry = GeometryTools.computeLine(0.00002,0.00002,renderEntity.geometry)
angleReference.properties["qi_table"] = renderEntity.table
angleReference.properties["width"] = "3"
angleReference.properties["widthProperties"] = "3"
angleReference.zoomMin = renderEntity.zoomMin
angleReference.zoomMax = renderEntity.zoomMax
angleReference.taskId = renderEntity.taskId
@ -845,8 +844,46 @@ class ImportPreProcess {
val listResult = mutableListOf<ReferenceEntity>()
val coorEnd = Coordinate(pointStart.getX() + dx, pointStart.getY() + dy, pointStart.z)
renderEntity.geometry = WKTWriter(3).write(GeometryTools.createLineString(arrayOf(pointStart, coorEnd)))
// renderEntity.geometry = WKTWriter(3).write(GeometryTools.createLineString(arrayOf(pointStart, coorEnd)))
renderEntity.geometry = GeometryTools.createGeometry(GeoPoint(centerPoint!!.y, centerPoint.x)).toString()
val code = renderEntity.properties["signType"]
renderEntity.properties["src"] = "assets:omdb/appendix/1105_${code}_0.svg"
}
/**
* 获取上方障碍物中心点坐标
*
* */
fun getPolygonCenterPoint(renderEntity: RenderEntity, containsDirect: Boolean = false) {
// 获取中心坐标点将中心坐标作为数据的新的geometry位置
val centerPoint = renderEntity.wkt?.centroid
if (containsDirect) {
// 根据heading方向自动生成新的Geometry
var radian = 0.0
val pointStart = Coordinate(centerPoint!!.x, centerPoint.y)
var angle =
if (renderEntity?.properties?.get("heading") == null) 0.0 else renderEntity?.properties?.get(
"heading"
)?.toDouble()!!
// angle角度为与正北方向的顺时针夹角将其转换为与X轴正方向的逆时针夹角即为正东方向的夹角
angle = ((450 - angle) % 360)
radian = Math.toRadians(angle)
// 计算偏移距离
var dx: Double = GeometryTools.convertDistanceToDegree(
defaultTranslateDistance,
centerPoint.y
) * Math.cos(radian)
var dy: Double = GeometryTools.convertDistanceToDegree(
defaultTranslateDistance,
centerPoint.y
) * Math.sin(radian)
val listResult = mutableListOf<ReferenceEntity>()
val coorEnd = Coordinate(pointStart.getX() + dx, pointStart.getY() + dy, pointStart.z)
renderEntity.geometry = WKTWriter(3).write(GeometryTools.createLineString(arrayOf(pointStart, coorEnd)))
} else {
renderEntity.geometry = GeometryTools.createGeometry(GeoPoint(centerPoint!!.y, centerPoint.x)).toString()
}
}
}

View File

@ -125,10 +125,13 @@ class TaskUploadScope(
}
taskBean.hadLinkDvoList.forEach { hadLinkDvoBean ->
Log.e("jingo", "数据上传遍历开始")
val linkStatus = 1
//存在原因标记未测评
if (hadLinkDvoBean.reason.isNotEmpty()) {
Log.e("jingo", "数据上传遍历开始0${hadLinkDvoBean.linkPid}")
//未测评
val linkStatus = 0
@ -160,6 +163,8 @@ class TaskUploadScope(
} else {
Log.e("jingo", "数据上传遍历开始1${hadLinkDvoBean.linkPid}")
val linkStatus = hadLinkDvoBean.linkStatus
var s: String = "%.3f".format(hadLinkDvoBean.length)//保留一位小数(且支持四舍五入)
@ -221,8 +226,9 @@ class TaskUploadScope(
}
}
}
realm.close()
Log.e("jingo", "数据上传遍历结束")
}
realm.close()
if (bodyList.size > 0) {
val result = uploadManager.netApi.postRequest(bodyList)// .enqueue(object :

View File

@ -40,7 +40,13 @@ class LoginActivity : CheckPermissionsActivity() {
binding.activity = this
initView()
Log.e("jingo", getScreenParams())
UMConfigure.init(this, "650bece7b2f6fa00ba573c7a", "native", UMConfigure.DEVICE_TYPE_PHONE, "")
UMConfigure.init(
this,
"650bece7b2f6fa00ba573c7a",
"native",
UMConfigure.DEVICE_TYPE_PHONE,
""
)
}
private fun getScreenParams(): String {

View File

@ -14,6 +14,7 @@ import com.google.gson.Gson
import com.google.gson.reflect.TypeToken
import com.navinfo.collect.library.data.entity.RenderEntity
import com.navinfo.collect.library.data.entity.TaskBean
import com.navinfo.collect.library.utils.GeometryTools
import com.navinfo.omqs.Constant
import com.navinfo.omqs.bean.LoginUserBean
import com.navinfo.omqs.bean.SysUserBean
@ -132,6 +133,7 @@ class LoginViewModel @Inject constructor(
}
//不指定IO会在主线程里运行
jobLogin = viewModelScope.launch(Dispatchers.IO) {
//Log.e("qj", "computeline==${GeometryTools.computeLine(0.003,0.003,"LINESTRING(116.2730063860964 40.09052257957624 36.75, 116.27376497186042 40.090072453495395 38.34, 116.27413076766412 40.089855289361786 39.01, 116.27417239035157 40.08983061650492 39.15, 116.27466896728139 40.089535645040385 39.99, 116.2751211296483 40.089267551829636 40.67, 116.27545352868347 40.089070581974944 40.98, 116.27589660200627 40.088807594767246 41.28, 116.27604819769634 40.088718103405185 41.34, 116.27667570485863 40.08834486145473 41.43, 116.2770275412774 40.08813642434714 41.36, 116.27745673745146 40.087882150865546 41.14, 116.27778797172138 40.08768490714857 40.89, 116.2781675465249 40.087459905560266 40.45, 116.2783819045443 40.087332076220086 40.02, 116.27880692426884 40.0870801193608 39.32, 116.27943180930261 40.08670963506418 38.04, 116.27977508323622 40.08650562397605 37.39, 116.28016410016664 40.08627485623695 36.77, 116.28057924586821 40.0860283164225 36.29)")}")
loginCheck(context, userName, password)
}

View File

@ -16,16 +16,18 @@ import androidx.activity.viewModels
import androidx.databinding.DataBindingUtil
import androidx.fragment.app.Fragment
import androidx.lifecycle.lifecycleScope
import androidx.navigation.NavController
import androidx.navigation.NavDestination
import androidx.lifecycle.viewModelScope
import androidx.navigation.Navigation
import androidx.navigation.findNavController
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.blankj.utilcode.util.ClipboardUtils
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.tabs.TabLayout
import com.navinfo.collect.library.data.entity.RenderEntity
import com.navinfo.collect.library.map.NIMapController
import com.navinfo.collect.library.map.handler.MeasureLayerHandler
import com.navinfo.collect.library.utils.GeometryTools
import com.navinfo.omqs.Constant
import com.navinfo.omqs.R
import com.navinfo.omqs.bean.ImportConfig
@ -45,8 +47,10 @@ import com.navinfo.omqs.ui.other.BaseToast
import com.navinfo.omqs.ui.widget.RecyclerViewSpacesItemDecoration
import com.navinfo.omqs.util.FlowEventBus
import com.navinfo.omqs.util.NaviStatus
import com.navinfo.omqs.util.SignUtil
import com.navinfo.omqs.util.SpeakMode
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import org.oscim.core.GeoPoint
@ -56,7 +60,6 @@ import java.math.BigDecimal
import java.math.RoundingMode
import javax.inject.Inject
/**
* 地图主页面
*/
@ -187,7 +190,7 @@ class MainActivity : BaseActivity() {
viewModel.speakMode = SpeakMode(this)
// 在mapController初始化前获取当前OMDB图层显隐
viewModel.refreshOMDBLayer(LayerConfigUtils.getLayerConfigList())
mapController.mMapView.vtmMap.viewport().maxZoomLevel = Constant.MAX_ZOOM
mapController.mMapView.vtmMap.viewport().maxZoomLevel = com.navinfo.collect.library.system.Constant.MAX_ZOOM
//关联生命周期
binding.lifecycleOwner = this
//给xml转递对象
@ -346,30 +349,22 @@ class MainActivity : BaseActivity() {
}
}
viewModel.liveDataSignMoreInfo.observe(this) {
val fragment =
supportFragmentManager.findFragmentById(R.id.main_activity_sign_more_info_fragment)
if (fragment == null) {
supportFragmentManager.beginTransaction()
.replace(R.id.main_activity_sign_more_info_fragment, SignMoreInfoFragment())
.commit()
if(!rightController.backQueue.isEmpty()){
rightController.navigateUp()
}
// val listener: NavController.OnDestinationChangedListener =
// NavController.OnDestinationChangedListener { _, _, _ ->
// val bundle = Bundle()
// bundle.putParcelable("SignBean", it)
// bundle.putBoolean("AutoSave", false)
// rightController.navigate(R.id.EvaluationResultFragment, bundle)
// }
// rightController.addOnDestinationChangedListener(listener)
// if(!rightController.navigateUp()) {
// val bundle = Bundle()
// bundle.putParcelable("SignBean", it)
// bundle.putBoolean("AutoSave", false)
// rightController.navigate(R.id.EvaluationResultFragment, bundle)
// }
rightController.navigateUp()
lifecycleScope.launch{
delay(100)
val fragment =
supportFragmentManager.findFragmentById(R.id.main_activity_sign_more_info_fragment)
if (fragment == null) {
supportFragmentManager.beginTransaction()
.replace(R.id.main_activity_sign_more_info_fragment, SignMoreInfoFragment())
.commit()
}else{
supportFragmentManager.beginTransaction().add(R.id.main_activity_sign_more_info_fragment, SignMoreInfoFragment()).commit()
}
val bundle = Bundle()
bundle.putParcelable("SignBean", it)
bundle.putBoolean("AutoSave", false)
@ -480,9 +475,9 @@ class MainActivity : BaseActivity() {
viewModel.liveDataItemList.observe(this) {
if (it.isNotEmpty()) {
if (leftFragment == null || leftFragment !is ItemListFragment) {
leftFragment = ItemListFragment { fragment ->
leftFragment = ItemListFragment {
binding.mainActivityLeftFragment.visibility = View.GONE
supportFragmentManager.beginTransaction().remove(fragment).commit()
supportFragmentManager.beginTransaction().remove(leftFragment!!).commit()
leftFragment = null
null
}
@ -698,7 +693,7 @@ class MainActivity : BaseActivity() {
Toast.makeText(this, "输入格式不正确", Toast.LENGTH_SHORT).show()
}
}
// dialog.dismiss()
dialog.dismiss()
}
inputDialog.show()
}
@ -794,7 +789,9 @@ class MainActivity : BaseActivity() {
* zoomin
*/
fun zoomInOnclick(view: View) {
mapController.animationHandler.zoomIn()
Log.e("qj", "computeline==${GeometryTools.computeLine(0.00003,0.00003,"LINESTRING(116.2730063860964 40.09052257957624 36.75, 116.27376497186042 40.090072453495395 38.34, 116.27413076766412 40.089855289361786 39.01, 116.27417239035157 40.08983061650492 39.15, 116.27466896728139 40.089535645040385 39.99, 116.2751211296483 40.089267551829636 40.67, 116.27545352868347 40.089070581974944 40.98, 116.27589660200627 40.088807594767246 41.28, 116.27604819769634 40.088718103405185 41.34, 116.27667570485863 40.08834486145473 41.43, 116.2770275412774 40.08813642434714 41.36, 116.27745673745146 40.087882150865546 41.14, 116.27778797172138 40.08768490714857 40.89, 116.2781675465249 40.087459905560266 40.45, 116.2783819045443 40.087332076220086 40.02, 116.27880692426884 40.0870801193608 39.32, 116.27943180930261 40.08670963506418 38.04, 116.27977508323622 40.08650562397605 37.39, 116.28016410016664 40.08627485623695 36.77, 116.28057924586821 40.0860283164225 36.29)")}")
//mapController.animationHandler.zoomIn()
}
/**
@ -1225,10 +1222,10 @@ class MainActivity : BaseActivity() {
/**
* 隐藏更多信息面板
*/
fun backSignMoreInfo() {
fun backSignMoreInfo(){
val fragment =
supportFragmentManager.findFragmentById(R.id.main_activity_sign_more_info_fragment)
if (fragment != null && !fragment.isHidden) {
if(fragment!=null&&!fragment.isHidden){
supportFragmentManager.beginTransaction().remove(fragment).commit()
}
}

View File

@ -178,7 +178,7 @@ class PersonalCenterFragment(private var indoorDataListener: ((Boolean) -> Unit?
// 定位到指定位置
niMapController.mMapView.vtmMap.animator()
// .animateTo(GeoPoint( 40.05108004733645, 116.29187746293708 ))
.animateTo(GeoPoint(40.5016054261786, 115.82381251427815))
.animateTo(GeoPoint(40.50704534740206, 115.80404946472662))
}
R.id.personal_center_menu_open_all_layer -> {

View File

@ -2,6 +2,7 @@ package com.navinfo.omqs.ui.fragment.tasklist
import android.annotation.SuppressLint
import android.graphics.Color
import android.text.TextUtils
import android.util.Log
import android.view.LayoutInflater
import android.view.View
@ -225,6 +226,9 @@ class TaskListAdapter(
binding.taskUploadBtn.stopAnimator()
binding.taskUploadBtn.setText("重新同步")
binding.taskUploadBtn.setProgress(100)
if(!TextUtils.isEmpty(taskBean.errMsg)){
Toast.makeText(binding.root.context,taskBean.errMsg,Toast.LENGTH_LONG).show()
}
}
FileUploadStatus.NONE -> {

View File

@ -503,9 +503,10 @@ class TaskViewModel @Inject constructor(
}
}
}
realm.close()
if(result==1){
liveDataTaskUpload.postValue(map)
withContext(Dispatchers.Main) {
liveDataTaskUpload.postValue(map)
val mDialog = FirstDialog(context)
mDialog.setTitle("提示?")
mDialog.setMessage("此任务中存在新增Link无问题记录请添加至少一条记录")
@ -518,8 +519,8 @@ class TaskViewModel @Inject constructor(
mDialog.show()
}
}else if(result==2){
liveDataTaskUpload.postValue(map)
withContext(Dispatchers.Main) {
liveDataTaskUpload.postValue(map)
val mDialog = FirstDialog(context)
mDialog.setTitle("提示?")
mDialog.setMessage("此任务中存在未测评link请确认")
@ -539,7 +540,6 @@ class TaskViewModel @Inject constructor(
map[taskBean] = true
liveDataTaskUpload.postValue(map)
}
realm.close()
}
}

View File

@ -59,7 +59,7 @@
<item
android:id="@+id/personal_center_menu_version"
android:icon="@drawable/ic_baseline_layers_24"
android:title="版本23QE4_V1.5.3_20230920_A" />
android:title="版本23QE4_V1.5.4_20230926_A" />
</group>
<group android:checkableBehavior="single">
<item android:title="小标题">

View File

@ -1587,12 +1587,12 @@
<!--车道中心线-->
<m v="OMDB_LANE_LINK_LG">
<m k="width" v="~">
<line stroke="#7A88A0" width="2.8" />
<!--
<line stroke="#7A88A0" width="2.5" />
-->
<m k="widthProperties">
<area use="obj-area" stroke="#7A88A0" repeat="true" src="assets:omdb/icon_5001_0.png" longEdge="t"></area>
</m>
<!-- <m k="width" v="~">
<line stroke="#4624FF" width="0.1" />
</m>-->
</m>
<!-- 检查点 -->
@ -1630,7 +1630,7 @@
</m>-->
<m k="boundaryType" v="1">
<!--无标线无可区分边界-->
<line dasharray="5,5" repeat-start="0" stroke="#ffffff" width="0.2"/>
<line dasharray="2,2" repeat-start="0" stroke="#ffffff" width="0.2"/>
</m>
</m>
@ -1639,15 +1639,19 @@
<outline-layer id="boundary" stroke="#ffffff" width="0.1" />
<!--只区分虚线与实线-->
<!-- <m k="boundaryType" v="1">
<line dasharray="5,5" repeat-start="5" stroke="#90A0BD" width="0.05"/>
</m>-->
<!--护栏-->
<m k="boundaryType" v="4">
<line stroke="#FFBC6E" use="boundaryType" width="0.1"/>
<symbol repeat-gap="12" repeat="true" repeat-start="0" src="assets:omdb/icon_2013_4.svg" symbol-width="16" symbol-height="46"></symbol>
</m>
<!--路牙-->
<m k="boundaryType" v="3">
<symbol repeat="true" repeat-gap="10" repeat-start="0" src="assets:omdb/icon_2013_3.svg" symbol-width="16" symbol-height="10"></symbol>
</m>
<m k="boundaryType" v="2">
<!--标线-->
<m k="markType" v="0|1|4|5|6|7|8">
<!--其他|实线-->
<m k="markType" v="1">
<m k="markColor" v="1">
<line stroke="#ffffff" use="boundaryType" />
</m>
@ -1667,11 +1671,7 @@
<line stroke="#8e44ad" use="boundaryType" />
</m>
</m>
<m k="markType" v="2|3">
<!--其他|实线-->
<m v="0|1|2|3|4|5|6|7|8">
<!--其他|实线-->
<m k="markType" v="2">
<m k="markColor" v="1">
<line dasharray="2,2" repeat-start="0" stroke="#ffffff" width="0.1"/>
</m>
@ -1690,19 +1690,50 @@
<m k="markColor" v="0|9">
<line dasharray="2,2" repeat-start="0" stroke="#8e44ad" width="0.1"/>
</m>
</m>
<m k="markType" v="8">
<m k="markColor" v="1">
<line dasharray="1,1" repeat-start="0" stroke="#ffffff" width="0.1"/>
</m>
<m k="markColor" v="2">
<line dasharray="1,1" repeat-start="0" stroke="#eccc68" width="0.1"/>
</m>
<m k="markColor" v="6">
<line dasharray="1,1" repeat-start="0" stroke="#0000ff" width="0.1"/>
</m>
<m k="markColor" v="7">
<line dasharray="1,1" repeat-start="0" stroke="#00ff00" width="0.1"/>
</m>
<m k="markColor" v="0|9">
<line dasharray="1,1" repeat-start="0" stroke="#8e44ad" width="0.1"/>
</m>
</m>
<m k="markType" v="6">
<!--其他|实线-->
<m k="markColor" v="1">
<symbol repeat="true" repeat-start="0" repeat-gap="24" src="assets:omdb/icon_2013_1.svg"/>
</m>
<m k="markColor" v="2">
<symbol repeat="true" repeat-start="0" repeat-gap="24" src="assets:omdb/icon_2013_2.svg"></symbol>
</m>
<m k="markColor" v="6">
<symbol repeat="true" repeat-start="0" repeat-gap="24" src="assets:omdb/icon_2013_6.svg"></symbol>
</m>
<m k="markColor" v="7">
<symbol repeat="true" repeat-start="0" repeat-gap="24" src="assets:omdb/icon_2013_7.svg"></symbol>
</m>
<m k="markColor" v="0|9">
<symbol repeat="true" repeat-start="0" repeat-gap="24" src="assets:omdb/icon_2013_0.svg"></symbol>
</m>
</m>
</m>
<!--护栏-->
<m k="boundaryType" v="4">
<line stroke="#FFBC6E" use="boundaryType" width="0.1"/>
<symbol repeat-gap="12" repeat="true" repeat-start="0" src="assets:omdb/icon_2013_4.svg" symbol-width="16" symbol-height="46"></symbol>
</m>
<!--路牙-->
<m k="boundaryType" v="3">
<symbol repeat="true" repeat-gap="10" repeat-start="0" src="assets:omdb/icon_2013_3.svg" symbol-width="16" symbol-height="10"></symbol>
</m>
<m k="boundaryType" v="5|7">
<line stroke="#ffffff" use="boundaryType" />
</m>
@ -1814,6 +1845,21 @@
<symbol repeat="false" repeat-start="0" gland="false" repeat-gap="0" src="assets:omdb/icon_2204_0.svg"></symbol>
</m>
<!-- 上方障碍物 -->
<m v="OMDB_OBJECT_OH_STRUCT">
<symbol repeat="false" repeat-start="0" gland="false" repeat-gap="32" symbol-width="42" symbol-height="42" src="assets:omdb/icon_3001_0.svg"></symbol>
</m>
<!-- 路口内交通岛 -->
<m v="OMDB_OBJECT_REFUGE_ISLAND">
<m k="type" v="1">
<area use="obj-area" repeat="true" src="assets:omdb/tex_fill_area_3027_1.svg"></area>
</m>
<m k="type" v="2">
<area use="obj-area" repeat="true" src="assets:omdb/tex_fill_area_3027_2.svg"></area>
</m>
</m>
<!-- 停止位置 -->
<m v="OMDB_OBJECT_STOPLOCATION">
@ -1923,26 +1969,30 @@
<!-- 文字 -->
<m v="OMDB_OBJECT_TEXT">
<m k="color" v="0">
<area use="obj-area" stroke="#00000000" fill="#dfe4ea" repeat="false" src="@text-src:textString" longEdge="t" hasDirect="true"></area>
<area use="obj-area" stroke="#00000000" fill="#3C4C56" repeat="false" src="@text-src:textString" longEdge="t" hasDirect="true"></area>
</m>
<m k="color" v="1">
<area use="obj-area" stroke="#00000000" fill="#ffffff" repeat="false" src="@text-src:textString" longEdge="t" hasDirect="true"></area>
</m>
<m k="color" v="2">
<area use="obj-area" stroke="#00000000" fill="#ffff00" repeat="false" src="@text-src:textString" longEdge="t" hasDirect="true"></area>
<area use="obj-area" stroke="#00000000" fill="#FFC729" repeat="false" src="@text-src:textString" longEdge="t" hasDirect="true"></area>
</m>
<m k="color" v="3">
<area use="obj-area" stroke="#00000000" fill="#ff0000" repeat="false" src="@text-src:textString" longEdge="t" hasDirect="true"></area>
<area use="obj-area" stroke="#00000000" fill="#E2233A" repeat="false" src="@text-src:textString" longEdge="t" hasDirect="true"></area>
</m>
<m k="color" v="4">
<area use="obj-area" stroke="#00000000" fill="#00ff00" repeat="false" src="@text-src:textString" longEdge="t" hasDirect="true"></area>
<area use="obj-area" stroke="#00000000" fill="#6A30C6" repeat="false" src="@text-src:textString" longEdge="t" hasDirect="true"></area>
</m>
<m k="color" v="9">
<area use="obj-area" stroke="#00000000" fill="#0000ff" repeat="false" src="@text-src:textString" longEdge="t" hasDirect="true"></area>
<area use="obj-area" stroke="#00000000" fill="#053CD6" repeat="false" src="@text-src:textString" longEdge="t" hasDirect="true"></area>
</m>
</m>
<!-- 符号 -->
<m v="OMDB_OBJECT_SYMBOL">
<!-- 未验证 -->
<m k="color" v="0">
<area use="obj-area" stroke="#00000000" repeat="false" src="assets:omdb/object_symbol_3003_0.svg" longEdge="t" hasDirect="true"></area>
</m>
<m k="color" v="1">
<area use="obj-area" stroke="#00000000" repeat="false" src="assets:omdb/object_symbol_3003_1.svg" longEdge="t" hasDirect="true"></area>
</m>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg t="1695622778812" class="icon" viewBox="0 0 1024 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="8830" xmlns:xlink="http://www.w3.org/1999/xlink"
width="48" height="48">
<path
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"
fill="#8e44ad" p-id="8831"></path>
<path d="M310.812444 270.222222l-241.777777 483.555556h644.152889l241.777777-483.555556z"
fill="#8e44ad" fill-opacity=".99" p-id="8832"></path>
</svg>

After

Width:  |  Height:  |  Size: 730 B

View File

@ -0,0 +1,11 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg t="1695622778812" class="icon" viewBox="0 0 1024 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="8830" xmlns:xlink="http://www.w3.org/1999/xlink"
width="48" height="48">
<path
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"
fill="#ffffff" p-id="8831"></path>
<path d="M310.812444 270.222222l-241.777777 483.555556h644.152889l241.777777-483.555556z"
fill="#ffffff" fill-opacity=".99" p-id="8832"></path>
</svg>

After

Width:  |  Height:  |  Size: 730 B

View File

@ -0,0 +1,11 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg t="1695622778812" class="icon" viewBox="0 0 1024 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="8830" xmlns:xlink="http://www.w3.org/1999/xlink"
width="48" height="48">
<path
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"
fill="#eccc68" p-id="8831"></path>
<path d="M310.812444 270.222222l-241.777777 483.555556h644.152889l241.777777-483.555556z"
fill="#eccc68" fill-opacity=".99" p-id="8832"></path>
</svg>

After

Width:  |  Height:  |  Size: 730 B

View File

@ -0,0 +1,11 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg t="1695622778812" class="icon" viewBox="0 0 1024 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="8830" xmlns:xlink="http://www.w3.org/1999/xlink"
width="48" height="48">
<path
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"
fill="#0000ff" p-id="8831"></path>
<path d="M310.812444 270.222222l-241.777777 483.555556h644.152889l241.777777-483.555556z"
fill="#0000ff" fill-opacity=".99" p-id="8832"></path>
</svg>

After

Width:  |  Height:  |  Size: 730 B

View File

@ -0,0 +1,11 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg t="1695622778812" class="icon" viewBox="0 0 1024 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="8830" xmlns:xlink="http://www.w3.org/1999/xlink"
width="48" height="48">
<path
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"
fill="#00ff00" p-id="8831"></path>
<path d="M310.812444 270.222222l-241.777777 483.555556h644.152889l241.777777-483.555556z"
fill="#00ff00" fill-opacity=".99" p-id="8832"></path>
</svg>

After

Width:  |  Height:  |  Size: 730 B

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="124.7" height="124.7" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 124.7 124.7"><defs><linearGradient id="f" x1="60.1" y1="37.3" x2="64.9" y2="37.3" 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="g" x1="29.2" y1="14.8" x2="95.5" y2="14.8" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#afbacb"/><stop offset=".1" stop-color="#c1ccda"/><stop offset=".4" stop-color="#d9e6f0"/><stop offset=".5" stop-color="#e3f0f8"/><stop offset=".6" stop-color="#dde9f2"/><stop offset=".8" stop-color="#ccd8e4"/><stop offset="1" stop-color="#b1bbcc"/><stop offset="1" stop-color="#aeb8c9"/></linearGradient><clipPath id="h"><rect x="29.7" y=".9" width="65.3" height="27.7" rx="4.6" ry="4.6" style="fill:#3a77d1;"/></clipPath></defs><g style="isolation:isolate;"><g id="b"><g id="c"><rect width="124.7" height="124.7" style="fill:#535a60; opacity:0;"/><ellipse id="d" cx="62.4" cy="61.3" rx="14.4" ry="3.7" style="fill:#262d34; isolation:isolate; opacity:.2;"/><ellipse id="e" cx="62.4" cy="61.3" rx="7.5" ry="3" style="fill:#535a60;"/><path d="M62.4,12.6h0c1.4,0,2.6,1.2,2.6,2.6V59.6c0,1.4-1.1,2.5-2.5,2.5h-.3c-1.4,0-2.5-1.1-2.5-2.5V15.2c0-1.4,1.2-2.6,2.6-2.6Z" style="fill:url(#f);"/><g><rect x="29.2" y=".5" width="66.3" height="28.7" rx="4.6" ry="4.6" style="fill:url(#g); stroke:#8b9fae; stroke-miterlimit:10; stroke-width:.9px;"/><g><rect x="29.7" y=".9" width="65.3" height="27.7" rx="4.6" ry="4.6" style="fill:#3a77d1;"/><g style="clip-path:url(#h);"><polygon points="37.5 28.6 27.5 28.6 43.4 .9 53.3 .9 37.5 28.6" style="fill:#30313d; mix-blend-mode:color-dodge;"/><polygon points="58.2 28.6 48.2 28.6 64.1 .9 74 .9 58.2 28.6" style="fill:#30313d; mix-blend-mode:color-dodge;"/><polygon points="79.2 28.6 69.2 28.6 85.1 .9 95 .9 79.2 28.6" style="fill:#30313d; mix-blend-mode:color-dodge;"/></g></g><text transform="translate(39.4 20.7)" style="fill:#fff; font-family:AlibabaPuHuiTiM-GBpc-EUC-H, &apos;Alibaba PuHuiTi&apos;; font-size:15.6px;"><tspan x="0" y="0">障碍物</tspan></text><rect x="29.7" y=".9" width="65.3" height="27.7" rx="4.6" ry="4.6" style="fill:none; stroke:#fff; stroke-miterlimit:10; stroke-width:.9px;"/></g></g></g></g></svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><defs><style>.d{fill:none;}.e{fill:#3c4c56;}</style></defs><g id="c"><rect class="d" width="24" height="24"/><path class="e" d="M21.2,11.6L12.3,1.3c-.2-.2-.4-.2-.6,0L2.8,11.6c-.2,.2-.2,.5,0,.7l8.9,10.4c.2,.2,.4,.2,.6,0l8.9-10.4c.2-.2,.2-.5,0-.7Zm-2.7,.7l-6.2,7.3c-.2,.2-.4,.2-.6,0l-6.2-7.3c-.2-.2-.2-.5,0-.7l6.2-7.3c.2-.2,.4-.2,.6,0l6.2,7.3c.2,.2,.2,.5,0,.7Z"/></g></svg>

After

Width:  |  Height:  |  Size: 499 B

View File

@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><defs><style>.n{opacity:0;stroke-width:1.2px;}.n,.o{fill:none;stroke:#fff;}.p{fill:#fff;fill-rule:evenodd;}</style></defs><g id="c"><g id="d"><g id="e"><g id="f"><g id="g"><rect id="h" class="n" x=".6" y=".6" width="22.8" height="22.8" rx="2" ry="2"/><g id="i"><polygon id="j" class="o" points="12 3 4 11.5 12 20 20 11.5 12 3"/><g id="k"><g id="l"><polygon id="m" class="p" points="12 3 17.1 13.8 12 9.7 6.9 13.8 12 3"/></g></g></g></g></g></g></g></g></svg>
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><defs><style>.d{fill:none;}.e{fill:#fff;}</style></defs><g id="c"><rect class="d" width="24" height="24"/><path class="e" d="M21.2,11.6L12.3,1.3c-.2-.2-.4-.2-.6,0L2.8,11.6c-.2,.2-.2,.5,0,.7l8.9,10.4c.2,.2,.4,.2,.6,0l8.9-10.4c.2-.2,.2-.5,0-.7Zm-2.7,.7l-6.2,7.3c-.2,.2-.4,.2-.6,0l-6.2-7.3c-.2-.2-.2-.5,0-.7l6.2-7.3c.2-.2,.4-.2,.6,0l6.2,7.3c.2,.2,.2,.5,0,.7Z"/></g></svg>

Before

Width:  |  Height:  |  Size: 586 B

After

Width:  |  Height:  |  Size: 496 B

View File

@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><defs><style>.o{opacity:0;stroke-width:1.2px;}.o,.p{fill:none;stroke:#ffdf24;}.q{fill:#ffdf24;fill-rule:evenodd;}</style></defs><g id="c"><g id="d"><g id="e"><g id="f"><g id="g"><g id="h"><rect id="i" class="o" x=".6" y=".6" width="22.8" height="22.8" rx="2" ry="2"/><g id="j"><polygon id="k" class="p" points="12 3.7 4 11.9 12 20 20 11.9 12 3.7"/><g id="l"><g id="m"><polygon id="n" class="q" points="12 3 17.1 13.3 12 9.5 6.9 13.3 12 3"/></g></g></g></g></g></g></g></g></g></svg>
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><defs><style>.d{fill:none;}.e{fill:#ffc729;}</style></defs><g id="c"><rect class="d" width="24" height="24"/><path class="e" d="M21.2,11.6L12.3,1.3c-.2-.2-.4-.2-.6,0L2.8,11.6c-.2,.2-.2,.5,0,.7l8.9,10.4c.2,.2,.4,.2,.6,0l8.9-10.4c.2-.2,.2-.5,0-.7Zm-2.7,.7l-6.2,7.3c-.2,.2-.4,.2-.6,0l-6.2-7.3c-.2-.2-.2-.5,0-.7l6.2-7.3c.2-.2,.4-.2,.6,0l6.2,7.3c.2,.2,.2,.5,0,.7Z"/></g></svg>

Before

Width:  |  Height:  |  Size: 610 B

After

Width:  |  Height:  |  Size: 499 B

View File

@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><defs><style>.o{opacity:0;stroke-width:1.2px;}.o,.p{fill:none;stroke:#b00b1f;}.q{fill:#b00b1f;fill-rule:evenodd;}</style></defs><g id="c"><g id="d"><g id="e"><g id="f"><g id="g"><g id="h"><rect id="i" class="o" x=".6" y=".6" width="22.8" height="22.8" rx="2" ry="2"/><g id="j"><polygon id="k" class="p" points="12 3 4 11.5 12 20 20 11.5 12 3"/><g id="l"><g id="m"><polygon id="n" class="q" points="12 3 17.1 13.8 12 9.7 6.9 13.8 12 3"/></g></g></g></g></g></g></g></g></g></svg>
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><defs><style>.d{fill:none;}.e{fill:#e2233a;}</style></defs><g id="c"><rect class="d" width="24" height="24"/><path class="e" d="M21.2,11.6L12.3,1.3c-.2-.2-.4-.2-.6,0L2.8,11.6c-.2,.2-.2,.5,0,.7l8.9,10.4c.2,.2,.4,.2,.6,0l8.9-10.4c.2-.2,.2-.5,0-.7Zm-2.7,.7l-6.2,7.3c-.2,.2-.4,.2-.6,0l-6.2-7.3c-.2-.2-.2-.5,0-.7l6.2-7.3c.2-.2,.4-.2,.6,0l6.2,7.3c.2,.2,.2,.5,0,.7Z"/></g></svg>

Before

Width:  |  Height:  |  Size: 606 B

After

Width:  |  Height:  |  Size: 499 B

View File

@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><defs><style>.o{opacity:0;stroke-width:1.2px;}.o,.p{fill:none;stroke:#2b4acb;}.q{fill:#2b4acb;fill-rule:evenodd;}</style></defs><g id="c"><g id="d"><g id="e"><g id="f"><g id="g"><g id="h"><rect id="i" class="o" x=".6" y=".6" width="22.8" height="22.8" rx="2" ry="2"/><g id="j"><polygon id="k" class="p" points="12 4 4 12.5 12 21 20 12.5 12 4"/><g id="l"><g id="m"><polygon id="n" class="q" points="12 4 17.1 14.8 12 10.7 6.9 14.8 12 4"/></g></g></g></g></g></g></g></g></g></svg>
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><defs><style>.d{fill:none;}.e{fill:#6a30c6;}</style></defs><g id="c"><rect class="d" width="24" height="24"/><path class="e" d="M18.8,11.7l-6.6-7.7c-.1-.1-.3-.1-.5,0l-6.6,7.7c-.1,.1-.1,.4,0,.5l6.6,7.7c.1,.1,.3,.1,.5,0l6.6-7.7c.1-.1,.1-.4,0-.5Zm-2,.5l-4.6,5.4c-.1,.1-.3,.1-.4,0l-4.6-5.4c-.1-.1-.1-.4,0-.5l4.6-5.4c.1-.1,.3-.1,.4,0l4.6,5.4c.1,.1,.1,.4,0,.5Z"/><path class="e" d="M20.8,2.2c.6,0,1,.4,1,1V20.8c0,.6-.4,1-1,1H3.2c-.6,0-1-.4-1-1V3.2c0-.6,.4-1,1-1H20.8m0-1H3.2c-1.1,0-2,.9-2,2V20.8c0,1.1,.9,2,2,2H20.8c1.1,0,2-.9,2-2V3.2c0-1.1-.9-2-2-2h0Z"/></g></svg>

Before

Width:  |  Height:  |  Size: 607 B

After

Width:  |  Height:  |  Size: 687 B

View File

@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><defs><style>.o{fill:#1500ff;}.p{fill:#ececec;fill-rule:evenodd;}.q{fill:none;stroke:#ececec;}</style></defs><g id="c"><g id="d"><g id="e"><g id="f"><g id="g"><g id="h"><rect id="i" class="o" width="24" height="24" rx="2" ry="2"/><g id="j"><g id="k"><g id="l"><polygon id="m" class="p" points="12 4 17.1 14.8 12 10.7 6.9 14.8 12 4"/></g></g><polygon id="n" class="q" points="12 4 4 12.5 12 21 20 12.5 12 4"/></g></g></g></g></g></g></g></svg>
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><defs><style>.d{fill:none;}.e{fill:#053cd6;}</style></defs><g id="c"><rect class="d" width="24" height="24"/><path class="e" d="M21.2,11.6L12.3,1.3c-.2-.2-.4-.2-.6,0L2.8,11.6c-.2,.2-.2,.5,0,.7l8.9,10.4c.2,.2,.4,.2,.6,0l8.9-10.4c.2-.2,.2-.5,0-.7Zm-2.7,.7l-6.2,7.3c-.2,.2-.4,.2-.6,0l-6.2-7.3c-.2-.2-.2-.5,0-.7l6.2-7.3c.2-.2,.4-.2,.6,0l6.2,7.3c.2,.2,.2,.5,0,.7Z"/></g></svg>

Before

Width:  |  Height:  |  Size: 570 B

After

Width:  |  Height:  |  Size: 499 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.2 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -36,12 +36,18 @@ public class OMDBReferenceDataSource implements ITileDataSource {
@Override
public void query(MapTile tile, ITileDataSink mapDataSink) {
// 获取tile对应的坐标范围
if (tile.zoomLevel >= Constant.OMDB_MIN_ZOOM && tile.zoomLevel < Constant.OVER_ZOOM) {
int m = Constant.OVER_ZOOM - tile.zoomLevel;
int xStart = (int) tile.tileX << m;
int xEnd = (int) ((tile.tileX + 1) << m);
int yStart = (int) tile.tileY << m;
int yEnd = (int) ((tile.tileY + 1) << m);
if (tile.zoomLevel >= Constant.OMDB_MIN_ZOOM && tile.zoomLevel <= Constant.DATA_ZOOM) {
int m = Constant.DATA_ZOOM - tile.zoomLevel;
int xStart = tile.tileX;
int xEnd = tile.tileX + 1;
int yStart = tile.tileY;
int yEnd = tile.tileY + 1;
if (m>0) {
xStart = (int) (xStart << m);
xEnd = (int) (xEnd << m);
yStart = (int) (yStart << m);
yEnd = (int) (yEnd << m);
}
if(isUpdate){

View File

@ -1,15 +1,9 @@
package com.navinfo.collect.library.map.source;
import android.util.Log;
import com.navinfo.collect.library.data.entity.RenderEntity;
import com.navinfo.collect.library.system.Constant;
import org.oscim.tiling.ITileDataSource;
import org.oscim.tiling.OverzoomTileDataSource;
import org.oscim.tiling.TileSource;
import io.realm.Realm;
public class OMDBReferenceTileSource extends RealmDBTileSource {
private OMDBReferenceDataSource omdbReferenceTileSource = new OMDBReferenceDataSource();
@ -17,7 +11,7 @@ public class OMDBReferenceTileSource extends RealmDBTileSource {
@Override
public ITileDataSource getDataSource() {
//return new OverzoomTileDataSource(new OMDBReferenceDataSource(), Constant.OVER_ZOOM);
return omdbReferenceTileSource;
return new OverzoomTileDataSource(omdbReferenceTileSource, Constant.OVER_ZOOM);
}
@Override

View File

@ -35,12 +35,18 @@ public class OMDBTileDataSource implements ITileDataSource {
@Override
public void query(MapTile tile, ITileDataSink mapDataSink) {
// 获取tile对应的坐标范围
if (tile.zoomLevel >= Constant.OMDB_MIN_ZOOM && tile.zoomLevel < Constant.OVER_ZOOM) {
int m = Constant.OVER_ZOOM - tile.zoomLevel;
int xStart = (int) tile.tileX << m;
int xEnd = (int) ((tile.tileX + 1) << m);
int yStart = (int) tile.tileY << m;
int yEnd = (int) ((tile.tileY + 1) << m);
if (tile.zoomLevel >= Constant.OMDB_MIN_ZOOM && tile.zoomLevel <= Constant.DATA_ZOOM) {
int m = Constant.DATA_ZOOM - tile.zoomLevel;
int xStart = tile.tileX;
int xEnd = tile.tileX + 1;
int yStart = tile.tileY;
int yEnd = tile.tileY + 1;
if (m>0) {
xStart = (int) (xStart << m);
xEnd = (int) (xEnd << m);
yStart = (int) (yStart << m);
yEnd = (int) (yEnd << m);
}
if(isUpdate){
Realm.getInstance(MapParamUtils.getTaskConfig()).refresh();

View File

@ -7,7 +7,6 @@ import com.navinfo.collect.library.system.Constant;
import org.oscim.tiling.ITileDataSource;
import org.oscim.tiling.OverzoomTileDataSource;
import org.oscim.tiling.TileSource;
import io.realm.Realm;
@ -16,7 +15,7 @@ public class OMDBTileSource extends RealmDBTileSource {
@Override
public ITileDataSource getDataSource() {
// return new OverzoomTileDataSource(new OMDBTileDataSource(), Constant.OVER_ZOOM);
return omdbTileSource;
return new OverzoomTileDataSource(omdbTileSource, Constant.OVER_ZOOM);
}
@Override

View File

@ -2,10 +2,6 @@ package com.navinfo.collect.library.system;
import android.os.Environment;
import com.navinfo.collect.library.map.source.RealmDBTileDataSource;
import org.oscim.tiling.OverzoomTileDataSource;
import java.util.HashMap;
import java.util.Map;
@ -30,8 +26,11 @@ public class Constant {
}
public static String[] HAD_LAYER_INVISIABLE_ARRAY;
public static final int OVER_ZOOM = 20;
public static final int MAX_ZOOM = 20;
// 渲染引擎开始切割的级别
public static final int OVER_ZOOM = 18;
public static final int MAX_ZOOM = 22;
// 数据保存时的zoom
public static final int DATA_ZOOM = 23;
public static final int OMDB_MIN_ZOOM = 15;
/**

View File

@ -2,6 +2,7 @@ package com.navinfo.collect.library.utils;
import android.graphics.Point;
import android.os.Build;
import android.text.TextUtils;
import android.util.Log;
import org.locationtech.jts.geom.Coordinate;
@ -13,6 +14,8 @@ import org.locationtech.jts.geom.MultiPoint;
import org.locationtech.jts.geom.MultiPolygon;
import org.locationtech.jts.geom.Polygon;
import org.locationtech.jts.io.WKTReader;
import org.locationtech.jts.operation.buffer.BufferOp;
import org.locationtech.jts.operation.buffer.BufferParameters;
import org.locationtech.jts.operation.linemerge.LineMerger;
import org.oscim.core.GeoPoint;
import org.oscim.core.MercatorProjection;
@ -1505,6 +1508,28 @@ public class GeometryTools {
}
/**
* @param distLeft 单位km
* @param distRight 单位km
* @param wkt 几何
* @return
*/
public static String computeLine(Double distLeft,Double distRight,String wkt){
if(!TextUtils.isEmpty(wkt)){
Geometry lineString1 = GeometryTools.createGeometry(wkt);
BufferParameters parameters1 = new BufferParameters();
parameters1.setEndCapStyle(BufferParameters.CAP_FLAT);
parameters1.setSingleSided(true);
Geometry buffer = BufferOp.bufferOp(lineString1, distLeft, parameters1);
Geometry buffer2 = BufferOp.bufferOp(lineString1, -distRight, parameters1);
String bufferWkt = buffer.union(buffer2).toString();
Log.e("qj",bufferWkt);
return bufferWkt;
}
return "";
}
public static FootAndDistance pointToLineDistance(GeoPoint point, Geometry geometry) {
//定义垂线
FootAndDistance pointPairDistance = new FootAndDistance(point);

View File

@ -38,8 +38,8 @@ class GeometryToolsKt {
}
}
// 分别计算最大和最小x值对应的tile号
val tileY0 = MercatorProjection.latitudeToTileY(minMaxY[0], Constant.OVER_ZOOM.toByte())
val tileY1 = MercatorProjection.latitudeToTileY(minMaxY[1], Constant.OVER_ZOOM.toByte())
val tileY0 = MercatorProjection.latitudeToTileY(minMaxY[0], Constant.DATA_ZOOM.toByte())
val tileY1 = MercatorProjection.latitudeToTileY(minMaxY[1], Constant.DATA_ZOOM.toByte())
val minTileY = if (tileY0 <= tileY1) tileY0 else tileY1
val maxTileY = if (tileY0 <= tileY1) tileY1 else tileY0
// println("getTileYByGeometry$envelope===$minTileY===$maxTileY")
@ -82,8 +82,8 @@ class GeometryToolsKt {
}
}
// 分别计算最大和最小x值对应的tile号
val tileX0 = MercatorProjection.longitudeToTileX(minMaxX[0], Constant.OVER_ZOOM.toByte())
val tileX1 = MercatorProjection.longitudeToTileX(minMaxX[1], Constant.OVER_ZOOM.toByte())
val tileX0 = MercatorProjection.longitudeToTileX(minMaxX[0], Constant.DATA_ZOOM.toByte())
val tileX1 = MercatorProjection.longitudeToTileX(minMaxX[1], Constant.DATA_ZOOM.toByte())
val minTileX = if (tileX0 <= tileX1) tileX0 else tileX1
val maxTileX = if (tileX0 <= tileX1) tileX1 else tileX0
// println("getTileXByGeometry$envelope$minTileX===$maxTileX")

2
vtm

@ -1 +1 @@
Subproject commit 39b9993b1cc5257d11c872161812ffe890e44bd9
Subproject commit 271e7b22785b0570a34c50476e17a98dfcca7e71