Skip to content

Commit

Permalink
fix: 특정 기기에서 location이 null 되는 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hxeyexn committed Aug 23, 2024
1 parent 725bde0 commit 9b4ccdf
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,12 @@ class MapsFragment : Fragment() {

private fun moveCamera(
googleMap: GoogleMap,
location: Location,
location: Location?,
) {
val currentLocation = LatLng(location.latitude, location.longitude)
googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentLocation, 15f))
if (location != null) {
val currentLocation = LatLng(location.latitude, location.longitude)
googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentLocation, 15f))
}
}

private fun onMarkerClicked(googleMap: GoogleMap) {
Expand Down

0 comments on commit 9b4ccdf

Please sign in to comment.