Skip to content

Commit

Permalink
Design: 지도 마커 썬디인 버전과 아닌 버전 구분하여 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaeYubin committed Aug 9, 2024
1 parent 6a64f80 commit 3f05671
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/containers/article/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const Map = ({ lat, lng }: Props) => {
latitude: lat,
longitude: lng,
},
false,
undefined,
undefined,
true,
Expand Down
1 change: 1 addition & 0 deletions src/containers/location/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const Map = ({ myNeighborhoods, radius }: Props) => {
latitude: myNeighborhoods.latitude,
longitude: myNeighborhoods.longitude,
},
false,
undefined,
undefined,
true,
Expand Down
1 change: 1 addition & 0 deletions src/containers/map/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const Map = ({ location, children, cafeInfo, setCafeInfo }: Props) => {

const { mapRef, mapObject, markersRef, radius, center } = useKakaoMap(
location,
true,
setShowInfo,
setShowReloadButton,
);
Expand Down
9 changes: 7 additions & 2 deletions src/hooks/custom/useKakaoMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { Location } from '@/types/map';
*/
const useKakaoMap = (
location: Location,
isMarkerSundy: boolean,
setShowInfo?: (show: boolean) => void,
setShowReloadButton?: (show: boolean) => void,
setStatic?: boolean,
Expand Down Expand Up @@ -90,8 +91,12 @@ const useKakaoMap = (

// 현재 위치 마커 생성
const currentMarkerImage = new window.kakao.maps.MarkerImage(
'/images/sundy/sundy_map.png',
new window.kakao.maps.Size(36, 56),
isMarkerSundy
? '/images/sundy/sundy_map.png'
: '/images/icon/marker_icon.png',
isMarkerSundy
? new window.kakao.maps.Size(36, 56)
: new window.kakao.maps.Size(37, 50),
{ offset: new window.kakao.maps.Point(27, 60) },
);

Expand Down

0 comments on commit 3f05671

Please sign in to comment.