@@ -66,7 +66,7 @@ open class TMap(
66
66
}
67
67
68
68
private val onLocationChangeListener = TMapGpsManager .OnLocationChangedListener { location ->
69
- if (location != null && checkKoreaLocation (location)) {
69
+ if (location != null && checkLocationInTMapLocation (location)) {
70
70
val beforeLocation = tMapView.locationPoint
71
71
val nowLocation = TMapPoint (location.latitude, location.longitude)
72
72
if (handler is MissionHandler ) {
@@ -93,9 +93,9 @@ open class TMap(
93
93
}
94
94
}
95
95
96
- private fun checkKoreaLocation (location : android.location.Location ): Boolean {
97
- return location.longitude > KOREA_LONGITUDE_MIN && location.longitude < KOREA_LONGITUDE_MAX
98
- && location.latitude > KOREA_LATITUDE_MIN && location.latitude < KOREA_LATITUDE_MAX
96
+ private fun checkLocationInTMapLocation (location : android.location.Location ): Boolean {
97
+ return TMapView . MIN_LON < location.longitude && location.longitude < TMapView . MAX_LON
98
+ && TMapView . MIN_LAT < location.latitude && location.latitude < TMapView . MAX_LAT
99
99
}
100
100
101
101
fun addMarker (id : String , icon : Int , location : TMapPoint ) {
@@ -111,12 +111,4 @@ open class TMap(
111
111
tMapView.removeTMapMarkerItem(id)
112
112
tMapView.addTMapMarkerItem(marker)
113
113
}
114
-
115
- companion object {
116
- private const val KOREA_LATITUDE_MIN = 32.814978
117
- private const val KOREA_LATITUDE_MAX = 39.036253
118
-
119
- private const val KOREA_LONGITUDE_MIN = 124.661865
120
- private const val KOREA_LONGITUDE_MAX = 132.550049
121
- }
122
114
}
0 commit comments