Skip to content

Commit

Permalink
#68 feat : Home 지도 Test Marker 찍기 성공
Browse files Browse the repository at this point in the history
Co-authored-by: yy0ung <[email protected]>
Co-authored-by: BENDENG1 <[email protected]>
  • Loading branch information
3 people committed Nov 21, 2023
1 parent b0f4d1c commit 3730e53
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ import com.avengers.nibobnebob.R
import com.avengers.nibobnebob.databinding.FragmentHomeBinding
import com.avengers.nibobnebob.presentation.base.BaseFragment
import com.avengers.nibobnebob.presentation.ui.main.MainViewModel
import com.naver.maps.geometry.LatLng
import com.naver.maps.map.LocationTrackingMode
import com.naver.maps.map.MapFragment
import com.naver.maps.map.NaverMap
import com.naver.maps.map.OnMapReadyCallback
import com.naver.maps.map.overlay.Marker
import com.naver.maps.map.overlay.OverlayImage
import com.naver.maps.map.util.FusedLocationSource
import dagger.hilt.android.AndroidEntryPoint

Expand Down Expand Up @@ -74,6 +76,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(R.layout.fragment_home),
naverMap.locationSource = locationSource
setMapListener()
initStateObserver()
setMarker()
}

private fun setMapListener(){
Expand Down Expand Up @@ -143,6 +146,11 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(R.layout.fragment_home),
private fun setMarker(){
val marker = Marker()

// example
marker.position = LatLng(37.555594049034,126.96707115682)
marker.icon = OverlayImage.fromResource(R.drawable.ic_location_circle)
marker.map = naverMap

// todo 마커의 포지션을 정함
// marker.position = LatLng(data.latitude,data.longitude)

Expand Down

0 comments on commit 3730e53

Please sign in to comment.