Skip to content

Commit 17d4515

Browse files
committed
refactor: TMap 최대, 최소 위경도 좌표 범위 값 수정
1 parent 38b5672 commit 17d4515

File tree

1 file changed

+4
-12
lines changed
  • presentation/src/main/java/com/stop/ui/util

1 file changed

+4
-12
lines changed

presentation/src/main/java/com/stop/ui/util/TMap.kt

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ open class TMap(
6666
}
6767

6868
private val onLocationChangeListener = TMapGpsManager.OnLocationChangedListener { location ->
69-
if (location != null && checkKoreaLocation(location)) {
69+
if (location != null && checkLocationInTMapLocation(location)) {
7070
val beforeLocation = tMapView.locationPoint
7171
val nowLocation = TMapPoint(location.latitude, location.longitude)
7272
if (handler is MissionHandler) {
@@ -93,9 +93,9 @@ open class TMap(
9393
}
9494
}
9595

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
9999
}
100100

101101
fun addMarker(id: String, icon: Int, location: TMapPoint) {
@@ -111,12 +111,4 @@ open class TMap(
111111
tMapView.removeTMapMarkerItem(id)
112112
tMapView.addTMapMarkerItem(marker)
113113
}
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-
}
122114
}

0 commit comments

Comments
 (0)