修复地图卡顿问题
This commit is contained in:
parent
6210f41b69
commit
694ad106d7
@ -55,7 +55,7 @@ class Constant {
|
|||||||
/**
|
/**
|
||||||
* 室内整理工具IP
|
* 室内整理工具IP
|
||||||
*/
|
*/
|
||||||
lateinit var INDOOR_IP: String
|
var INDOOR_IP: String = ""
|
||||||
|
|
||||||
const val DEBUG = true
|
const val DEBUG = true
|
||||||
|
|
||||||
|
@ -106,6 +106,7 @@ class MainActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//点击详细信息
|
//点击详细信息
|
||||||
|
@RequiresApi(Build.VERSION_CODES.N)
|
||||||
override fun onMoreInfoClick(selectTag: String, tag: String, signBean: SignBean) {
|
override fun onMoreInfoClick(selectTag: String, tag: String, signBean: SignBean) {
|
||||||
viewModel.showSignMoreInfo(signBean.renderEntity)
|
viewModel.showSignMoreInfo(signBean.renderEntity)
|
||||||
val fragment =
|
val fragment =
|
||||||
@ -146,7 +147,7 @@ class MainActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.M)
|
@RequiresApi(Build.VERSION_CODES.N)
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
@ -225,8 +226,10 @@ class MainActivity : BaseActivity() {
|
|||||||
|
|
||||||
//捕捉列表变化回调
|
//捕捉列表变化回调
|
||||||
viewModel.liveDataNILocationList.observe(this) {
|
viewModel.liveDataNILocationList.observe(this) {
|
||||||
|
if(viewModel.isSelectTrace()){
|
||||||
Toast.makeText(this,"轨迹被点击了",Toast.LENGTH_LONG).show()
|
Toast.makeText(this,"轨迹被点击了",Toast.LENGTH_LONG).show()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//右上角菜单是否被点击
|
//右上角菜单是否被点击
|
||||||
viewModel.liveDataMenuState.observe(this) {
|
viewModel.liveDataMenuState.observe(this) {
|
||||||
@ -372,7 +375,7 @@ class MainActivity : BaseActivity() {
|
|||||||
mapController.mMapView.onPause()
|
mapController.mMapView.onPause()
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.M)
|
@RequiresApi(Build.VERSION_CODES.N)
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
viewModel.speakMode?.shutdown()
|
viewModel.speakMode?.shutdown()
|
||||||
@ -403,7 +406,7 @@ class MainActivity : BaseActivity() {
|
|||||||
/**
|
/**
|
||||||
* 打开相机预览
|
* 打开相机预览
|
||||||
*/
|
*/
|
||||||
@RequiresApi(Build.VERSION_CODES.M)
|
@RequiresApi(Build.VERSION_CODES.N)
|
||||||
fun openCamera() {
|
fun openCamera() {
|
||||||
//显示轨迹图层
|
//显示轨迹图层
|
||||||
viewModel.onClickCameraButton(this)
|
viewModel.onClickCameraButton(this)
|
||||||
@ -412,7 +415,7 @@ class MainActivity : BaseActivity() {
|
|||||||
/**
|
/**
|
||||||
* 开关菜单
|
* 开关菜单
|
||||||
*/
|
*/
|
||||||
@RequiresApi(Build.VERSION_CODES.M)
|
@RequiresApi(Build.VERSION_CODES.N)
|
||||||
fun onClickMenu() {
|
fun onClickMenu() {
|
||||||
//显示菜单图层
|
//显示菜单图层
|
||||||
viewModel.onClickMenu()
|
viewModel.onClickMenu()
|
||||||
@ -520,11 +523,82 @@ class MainActivity : BaseActivity() {
|
|||||||
/**
|
/**
|
||||||
* 点击线选择
|
* 点击线选择
|
||||||
*/
|
*/
|
||||||
|
@RequiresApi(Build.VERSION_CODES.N)
|
||||||
fun selectLineOnclick() {
|
fun selectLineOnclick() {
|
||||||
viewModel.setSelectRoad(!viewModel.isSelectRoad())
|
viewModel.setSelectRoad(!viewModel.isSelectRoad())
|
||||||
binding.mainActivitySelectLine.isSelected = viewModel.isSelectRoad()
|
binding.mainActivitySelectLine.isSelected = viewModel.isSelectRoad()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击线选择
|
||||||
|
*/
|
||||||
|
@RequiresApi(Build.VERSION_CODES.N)
|
||||||
|
fun tracePointsOnclick() {
|
||||||
|
viewModel.setSelectTrace(!viewModel.isSelectTrace())
|
||||||
|
if(viewModel.isSelectTrace()){
|
||||||
|
Toast.makeText(this,"请选择轨迹点!",Toast.LENGTH_LONG).show()
|
||||||
|
}
|
||||||
|
binding.mainActivityTraceSnapshotPoints.isSelected = viewModel.isSelectTrace()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击结束轨迹操作
|
||||||
|
*/
|
||||||
|
@RequiresApi(Build.VERSION_CODES.N)
|
||||||
|
fun finishTraceOnclick() {
|
||||||
|
setIndoorGroupEnable(false)
|
||||||
|
viewModel.setSelectTrace(false)
|
||||||
|
viewModel.setMediaFlag(false)
|
||||||
|
viewModel.setSelectPauseTrace(false)
|
||||||
|
binding.mainActivityTraceSnapshotPoints.isSelected = viewModel.isSelectTrace()
|
||||||
|
binding.mainActivitySnapshotMediaFlag.isSelected = viewModel.isMediaFlag()
|
||||||
|
binding.mainActivitySnapshotPause.isSelected = viewModel.isSelectPauseTrace()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击结束轨迹操作
|
||||||
|
*/
|
||||||
|
@RequiresApi(Build.VERSION_CODES.N)
|
||||||
|
fun mediaFlagOnclick() {
|
||||||
|
viewModel.setMediaFlag(!viewModel.isMediaFlag())
|
||||||
|
binding.mainActivitySnapshotMediaFlag.isSelected = viewModel.isMediaFlag()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击上一个轨迹点播放操作
|
||||||
|
*/
|
||||||
|
@RequiresApi(Build.VERSION_CODES.N)
|
||||||
|
fun rewindTraceOnclick() {
|
||||||
|
pasePlayTrace()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击暂停播放轨迹操作
|
||||||
|
*/
|
||||||
|
@RequiresApi(Build.VERSION_CODES.N)
|
||||||
|
fun pauseTraceOnclick() {
|
||||||
|
viewModel.setSelectPauseTrace(!viewModel.isSelectPauseTrace())
|
||||||
|
binding.mainActivitySnapshotPause.isSelected = viewModel.isSelectPauseTrace()
|
||||||
|
viewModel.setSelectTrace(false)
|
||||||
|
binding.mainActivityTraceSnapshotPoints.isSelected = viewModel.isSelectTrace()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击下一个轨迹点
|
||||||
|
*/
|
||||||
|
@RequiresApi(Build.VERSION_CODES.N)
|
||||||
|
fun nextTraceOnclick() {
|
||||||
|
pasePlayTrace()
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequiresApi(Build.VERSION_CODES.N)
|
||||||
|
fun pasePlayTrace() {
|
||||||
|
viewModel.setSelectTrace(false)
|
||||||
|
binding.mainActivityTraceSnapshotPoints.isSelected = viewModel.isSelectTrace()
|
||||||
|
viewModel.setSelectPauseTrace(false)
|
||||||
|
binding.mainActivitySnapshotPause.isSelected = viewModel.isSelectPauseTrace()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 打开或关闭底部导航栏
|
* 打开或关闭底部导航栏
|
||||||
@ -548,7 +622,7 @@ class MainActivity : BaseActivity() {
|
|||||||
.animateTo(GeoPoint( mapController.mMapView.vtmMap.mapPosition.geoPoint.latitude,mapController.mMapView.vtmMap.mapPosition.geoPoint.longitude))
|
.animateTo(GeoPoint( mapController.mMapView.vtmMap.mapPosition.geoPoint.latitude,mapController.mMapView.vtmMap.mapPosition.geoPoint.longitude))
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.M)
|
@RequiresApi(Build.VERSION_CODES.N)
|
||||||
private fun voiceOnTouchStart() {
|
private fun voiceOnTouchStart() {
|
||||||
viewModel.startSoundMetter(this, binding.mainActivityVoice)
|
viewModel.startSoundMetter(this, binding.mainActivityVoice)
|
||||||
}
|
}
|
||||||
@ -606,6 +680,20 @@ class MainActivity : BaseActivity() {
|
|||||||
*/
|
*/
|
||||||
fun showIndoorDataLayout() {
|
fun showIndoorDataLayout() {
|
||||||
binding.mainActivityMenuIndoorGroup.visibility = View.VISIBLE
|
binding.mainActivityMenuIndoorGroup.visibility = View.VISIBLE
|
||||||
|
if(Constant.INDOOR_IP.isNotEmpty()){
|
||||||
|
setIndoorGroupEnable(true)
|
||||||
|
}else{
|
||||||
|
setIndoorGroupEnable(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setIndoorGroupEnable(enable: Boolean){
|
||||||
|
binding.mainActivitySnapshotFinish.isEnabled = enable
|
||||||
|
binding.mainActivityTraceSnapshotPoints.isEnabled = enable
|
||||||
|
binding.mainActivitySnapshotMediaFlag.isEnabled = enable
|
||||||
|
binding.mainActivitySnapshotRewind.isEnabled = enable
|
||||||
|
binding.mainActivitySnapshotPause.isEnabled = enable
|
||||||
|
binding.mainActivitySnapshotNext.isEnabled = enable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -638,7 +726,7 @@ class MainActivity : BaseActivity() {
|
|||||||
/**
|
/**
|
||||||
* 打开道路名称属性看板,选择的道路在viewmodel里记录,不用
|
* 打开道路名称属性看板,选择的道路在viewmodel里记录,不用
|
||||||
*/
|
*/
|
||||||
@RequiresApi(Build.VERSION_CODES.M)
|
@RequiresApi(Build.VERSION_CODES.N)
|
||||||
fun openRoadNameFragment() {
|
fun openRoadNameFragment() {
|
||||||
if (viewModel.liveDataRoadName.value != null) {
|
if (viewModel.liveDataRoadName.value != null) {
|
||||||
viewModel.showSignMoreInfo(viewModel.liveDataRoadName.value!!)
|
viewModel.showSignMoreInfo(viewModel.liveDataRoadName.value!!)
|
||||||
|
@ -63,6 +63,7 @@ import javax.inject.Inject
|
|||||||
* 创建Activity全局viewmode
|
* 创建Activity全局viewmode
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@RequiresApi(Build.VERSION_CODES.N)
|
||||||
@HiltViewModel
|
@HiltViewModel
|
||||||
class MainViewModel @Inject constructor(
|
class MainViewModel @Inject constructor(
|
||||||
private val mapController: NIMapController,
|
private val mapController: NIMapController,
|
||||||
@ -113,6 +114,7 @@ class MainViewModel @Inject constructor(
|
|||||||
|
|
||||||
var menuState: Boolean = false
|
var menuState: Boolean = false
|
||||||
|
|
||||||
|
var captureLinkState: Boolean = false
|
||||||
|
|
||||||
val liveDataMenuState = MutableLiveData<Boolean>()
|
val liveDataMenuState = MutableLiveData<Boolean>()
|
||||||
|
|
||||||
@ -123,6 +125,21 @@ class MainViewModel @Inject constructor(
|
|||||||
*/
|
*/
|
||||||
private var bSelectRoad = false
|
private var bSelectRoad = false
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是不是选择轨迹点
|
||||||
|
*/
|
||||||
|
private var bSelectTrace = false
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是不是选择标题标识
|
||||||
|
*/
|
||||||
|
private var isMediaFlag = false
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是不是暂停
|
||||||
|
*/
|
||||||
|
private var bSelectPauseTrace = false
|
||||||
|
|
||||||
private var linkIdCache = ""
|
private var linkIdCache = ""
|
||||||
|
|
||||||
private var lastNiLocaion: NiLocation? = null
|
private var lastNiLocaion: NiLocation? = null
|
||||||
@ -158,11 +175,11 @@ class MainViewModel @Inject constructor(
|
|||||||
mapController.onMapClickFlow.collectLatest {
|
mapController.onMapClickFlow.collectLatest {
|
||||||
// testPoint = it
|
// testPoint = it
|
||||||
//线选择状态
|
//线选择状态
|
||||||
if (bSelectRoad) {
|
/* if (bSelectRoad) {
|
||||||
captureLink(it)
|
captureLink(it)
|
||||||
} else {
|
} else {
|
||||||
captureItem(it)
|
captureItem(it)
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
viewModelScope.launch(Dispatchers.IO) {
|
viewModelScope.launch(Dispatchers.IO) {
|
||||||
@ -235,10 +252,14 @@ class MainViewModel @Inject constructor(
|
|||||||
/**
|
/**
|
||||||
* 初始化定位信息
|
* 初始化定位信息
|
||||||
*/
|
*/
|
||||||
|
@RequiresApi(Build.VERSION_CODES.N)
|
||||||
private fun initLocation() {
|
private fun initLocation() {
|
||||||
//用于定位点存储到数据库
|
//用于定位点存储到数据库
|
||||||
viewModelScope.launch(Dispatchers.Default) {
|
viewModelScope.launch(Dispatchers.Default) {
|
||||||
mapController.locationLayerHandler.niLocationFlow.collect { location ->
|
mapController.locationLayerHandler.niLocationFlow.collect { location ->
|
||||||
|
|
||||||
|
//过滤掉无效点
|
||||||
|
if(!GeometryTools.isCheckError(location.longitude,location.latitude)){
|
||||||
val geometry = GeometryTools.createGeometry(
|
val geometry = GeometryTools.createGeometry(
|
||||||
GeoPoint(
|
GeoPoint(
|
||||||
location.latitude, location.longitude
|
location.latitude, location.longitude
|
||||||
@ -272,22 +293,23 @@ class MainViewModel @Inject constructor(
|
|||||||
//相距差距大于2.5米以上进行存储
|
//相距差距大于2.5米以上进行存储
|
||||||
if (disance > 2.5) {
|
if (disance > 2.5) {
|
||||||
traceDataBase.niLocationDao.insert(location)
|
traceDataBase.niLocationDao.insert(location)
|
||||||
mapController.markerHandle.addNiLocationMarkerItem(location)
|
/* mapController.markerHandle.addNiLocationMarkerItem(location)
|
||||||
mapController.mMapView.vtmMap.updateMap(true)
|
mapController.mMapView.vtmMap.updateMap(true)*/
|
||||||
|
lastNiLocaion = location
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
traceDataBase.niLocationDao.insert(location)
|
traceDataBase.niLocationDao.insert(location)
|
||||||
mapController.markerHandle.addNiLocationMarkerItem(location)
|
/* mapController.markerHandle.addNiLocationMarkerItem(location)
|
||||||
mapController.mMapView.vtmMap.updateMap(true)
|
mapController.mMapView.vtmMap.updateMap(true)*/
|
||||||
}
|
|
||||||
|
|
||||||
lastNiLocaion = location
|
lastNiLocaion = location
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
//用于定位点捕捉道路
|
//用于定位点捕捉道路
|
||||||
viewModelScope.launch(Dispatchers.Default) {
|
viewModelScope.launch(Dispatchers.Default) {
|
||||||
mapController.locationLayerHandler.niLocationFlow.collectLatest { location ->
|
mapController.locationLayerHandler.niLocationFlow.collectLatest { location ->
|
||||||
if (!isSelectRoad()) captureLink(
|
if (!isSelectRoad()&&!GeometryTools.isCheckError(location.longitude,location.latitude)) captureLink(
|
||||||
GeoPoint(
|
GeoPoint(
|
||||||
location.latitude,
|
location.latitude,
|
||||||
location.longitude
|
location.longitude
|
||||||
@ -311,7 +333,14 @@ class MainViewModel @Inject constructor(
|
|||||||
/**
|
/**
|
||||||
* 捕获道路和面板
|
* 捕获道路和面板
|
||||||
*/
|
*/
|
||||||
|
@RequiresApi(Build.VERSION_CODES.N)
|
||||||
private suspend fun captureLink(point: GeoPoint) {
|
private suspend fun captureLink(point: GeoPoint) {
|
||||||
|
if(captureLinkState){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
try{
|
||||||
|
captureLinkState = true
|
||||||
|
|
||||||
val linkList = realmOperateHelper.queryLink(
|
val linkList = realmOperateHelper.queryLink(
|
||||||
point = point,
|
point = point,
|
||||||
@ -408,6 +437,12 @@ class MainViewModel @Inject constructor(
|
|||||||
liveDataRoadName.postValue(null)
|
liveDataRoadName.postValue(null)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}catch (e:Exception){
|
||||||
|
|
||||||
|
}finally {
|
||||||
|
captureLinkState = false
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -588,6 +623,48 @@ class MainViewModel @Inject constructor(
|
|||||||
return bSelectRoad
|
return bSelectRoad
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开启轨迹选择
|
||||||
|
*/
|
||||||
|
fun setSelectTrace(select: Boolean) {
|
||||||
|
bSelectTrace = select
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否开启了轨迹选择
|
||||||
|
*/
|
||||||
|
fun isSelectTrace(): Boolean {
|
||||||
|
return bSelectTrace
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开启媒体标识
|
||||||
|
*/
|
||||||
|
fun setMediaFlag(select: Boolean) {
|
||||||
|
isMediaFlag = select
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否开启了媒体标识
|
||||||
|
*/
|
||||||
|
fun isMediaFlag(): Boolean {
|
||||||
|
return isMediaFlag
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开启轨迹选择
|
||||||
|
*/
|
||||||
|
fun setSelectPauseTrace(select: Boolean) {
|
||||||
|
bSelectPauseTrace = select
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否开启了轨迹选择
|
||||||
|
*/
|
||||||
|
fun isSelectPauseTrace(): Boolean {
|
||||||
|
return bSelectPauseTrace
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 要展示的要素详细信息
|
* 要展示的要素详细信息
|
||||||
*/
|
*/
|
||||||
|
@ -350,43 +350,36 @@
|
|||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/main_activity_snapshot_finish"
|
android:id="@+id/main_activity_snapshot_finish"
|
||||||
style="@style/top_right_drawer_btns_style"
|
style="@style/top_right_drawer_btns_style"
|
||||||
android:clickable="true"
|
android:onClick="@{()->mainActivity.finishTraceOnclick()}"
|
||||||
android:enabled="false"
|
|
||||||
android:focusable="true"
|
|
||||||
android:src="@drawable/map_trace_finish" />
|
android:src="@drawable/map_trace_finish" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/main_activity_trace_snapshot_points"
|
android:id="@+id/main_activity_trace_snapshot_points"
|
||||||
style="@style/top_right_drawer_btns_style"
|
style="@style/top_right_drawer_btns_style"
|
||||||
android:focusable="true"
|
android:onClick="@{()->mainActivity.tracePointsOnclick()}"
|
||||||
android:src="@drawable/map_trace_select_point" />
|
android:src="@drawable/map_trace_select_point" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/main_activity_snapshot_media_flag"
|
android:id="@+id/main_activity_snapshot_media_flag"
|
||||||
style="@style/top_right_drawer_btns_style"
|
style="@style/top_right_drawer_btns_style"
|
||||||
android:enabled="false"
|
android:onClick="@{()->mainActivity.mediaFlagOnclick()}"
|
||||||
android:focusable="true"
|
|
||||||
android:src="@drawable/map_trace_mediaflag" />
|
android:src="@drawable/map_trace_mediaflag" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/main_activity_snapshot_rewind"
|
android:id="@+id/main_activity_snapshot_rewind"
|
||||||
style="@style/top_right_drawer_btns_style"
|
style="@style/top_right_drawer_btns_style"
|
||||||
android:enabled="false"
|
android:onClick="@{()->mainActivity.rewindTraceOnclick()}"
|
||||||
android:focusable="true"
|
|
||||||
android:src="@drawable/map_trace_forward" />
|
android:src="@drawable/map_trace_forward" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/main_activity_snapshot_pause"
|
android:id="@+id/main_activity_snapshot_pause"
|
||||||
style="@style/top_right_drawer_btns_style"
|
style="@style/top_right_drawer_btns_style"
|
||||||
android:enabled="false"
|
android:onClick="@{()->mainActivity.pauseTraceOnclick()}"
|
||||||
android:focusable="true"
|
|
||||||
android:src="@drawable/map_trace_pause" />
|
android:src="@drawable/map_trace_pause" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/main_activity_snapshot_next"
|
android:id="@+id/main_activity_snapshot_next"
|
||||||
style="@style/top_right_drawer_btns_style"
|
style="@style/top_right_drawer_btns_style"
|
||||||
android:enabled="false"
|
|
||||||
android:focusable="true"
|
|
||||||
android:src="@drawable/map_trace_next" />
|
android:src="@drawable/map_trace_next" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
@ -1329,9 +1329,9 @@ public class GeometryTools {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isCheckError(double lon, double lat) {
|
public static boolean isCheckError(double lon, double lat) {
|
||||||
/* if(lon==0&&lat==0){
|
if(lon==0||lat==0){
|
||||||
return true;
|
return true;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
if (lon > 180 || lon < -180 || lat > 90 || lat < -90) {
|
if (lon > 180 || lon < -180 || lat > 90 || lat < -90) {
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user